Skip to content

Commit 4a32689

Browse files
committed
Rename handler btn-remove click
1 parent 51a1d51 commit 4a32689

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

example/MultiSelect/MultiSelect.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const Dropdown: React.FC<Props> = ({ onSelect, values }) => {
103103
}
104104
};
105105

106-
const handleCloseClick = (item: Item) => (event) => {
106+
const handleRemoveClick = (item: Item) => (event) => {
107107
event.stopPropagation();
108108
const newArr = values.filter((el) => el.value !== item.value);
109109
onSelect(newArr);
@@ -135,7 +135,7 @@ export const Dropdown: React.FC<Props> = ({ onSelect, values }) => {
135135
<button
136136
type="button"
137137
className="remove"
138-
onClick={handleCloseClick(item)}
138+
onClick={handleRemoveClick(item)}
139139
tabIndex={isFocused ? 0 : -1}
140140
aria-label={`Remove value ${item.name}`}
141141
></button>

0 commit comments

Comments
 (0)