Skip to content

Commit

Permalink
fix(fuselage): No preventDefault on PaginatedSelect (#490)
Browse files Browse the repository at this point in the history
* [FIX] No preventDefault on PaginatedSelect

* Fix prettier
  • Loading branch information
MartinSchoeler authored Jul 6, 2021
1 parent 6262839 commit 0ffb736
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ const Focus = React.forwardRef((props, ref) => (
/>
));

const prevent = (e) => {
e.preventDefault();
e.stopPropagation();
e.nativeEvent.stopImmediatePropagation();
};

const useDidUpdate = (func = []) => {
const didMount = useRef(false);
const fn = useMutableCallback(func);
Expand Down Expand Up @@ -153,6 +159,7 @@ export const PaginatedSelect = ({
options={options}
onSelect={internalChangedByClick}
endReached={endReached}
onMouseDown={prevent}
/>
</PositionAnimated>
</Box>
Expand Down

0 comments on commit 0ffb736

Please sign in to comment.