Skip to content

Commit

Permalink
Added second param to dependency array in useEffect (#267)
Browse files Browse the repository at this point in the history
* Added second param to dependecy array in useEffect

* Add back linting

Co-authored-by: eijnehc-one <[email protected]>
  • Loading branch information
chenjie-b1 and chenjie-b1 authored Jan 22, 2021
1 parent 113cf6f commit effe683
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/select-panel/select-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const SelectItem = ({
useEffect(() => {
updateFocus();
// eslint-disable-next-line
}, [focused]);
}, [checked, focused]);

const toggleChecked = () => {
onSelectionChanged(!checked);
Expand Down

0 comments on commit effe683

Please sign in to comment.