Skip to content

Commit 27c2a51

Browse files
refactor(select-field): remove double onClick
1 parent 879cb41 commit 27c2a51

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

packages/bento-design-system/src/SelectField/components.tsx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -228,20 +228,9 @@ export function MenuList<A extends { disabled?: boolean }>(props: MenuListProps<
228228
}
229229

230230
export function Option<B, A extends SelectOption<B>>(props: OptionProps<A>) {
231-
const { innerProps } = props;
232-
231+
const { onClick, ...innerProps } = props.innerProps;
233232
return (
234-
<defaultComponents.Option
235-
{...props}
236-
innerProps={{
237-
...innerProps,
238-
// On touch devices, prevent the browser from synthesizing a follow-up click
239-
// that could hit whatever is behind the menu after it closes.
240-
onTouchEnd: (e) => {
241-
e.preventDefault();
242-
},
243-
}}
244-
>
233+
<defaultComponents.Option {...props} innerProps={innerProps}>
245234
<ListItem
246235
{...props.data}
247236
size={props.selectProps.menuSize ?? "medium"}

0 commit comments

Comments
 (0)