Skip to content

Commit

Permalink
Checkboxes in dropdowns now correctly visually update when clicked (#…
Browse files Browse the repository at this point in the history
…21725)

* preventDefault was necessary to make the checkboxes work

* e -> event to reduce file diff
  • Loading branch information
krishnaglick authored Jan 23, 2023
1 parent b7685a7 commit 3b1864f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export const DropDownOption: React.FC<DropDownOptionProps> = (props) => {
// for cases where the Dropdown is a child of a clickable parent such as a table row.
props.selectOption(props.data);
event.stopPropagation();
// The checkbox does not work properly without this
event.preventDefault();
}}
>
<DropDownText primary={props.data.primary} secondary={props.data.secondary} fullText={props.data.fullText}>
Expand Down

0 comments on commit 3b1864f

Please sign in to comment.