Skip to content

Commit 1d1eaad

Browse files
committed
fix(custom-select): improve event handling in handleTagRemove function
1 parent 80bd357 commit 1d1eaad

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/components/src/components/custom-select/custom-select.lite.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,9 @@ export default function DBCustomSelect(props: DBCustomSelectProps) {
258258
// Fallback to default behavior
259259
return `${DEFAULT_REMOVE} ${state.getOptionLabel(option)}`;
260260
},
261-
handleTagRemove: (
262-
option: CustomSelectOptionType,
263-
event?: ClickEvent<HTMLButtonElement> | void
264-
) => {
261+
handleTagRemove: (option: CustomSelectOptionType, event?: any) => {
265262
if (event) {
266-
event.stopPropagation();
263+
event.stopPropagation?.();
267264
}
268265

269266
state.handleSelect(option.value);

0 commit comments

Comments
 (0)