Skip to content

Commit 0ffb736

Browse files
fix(fuselage): No preventDefault on PaginatedSelect (#490)
* [FIX] No preventDefault on PaginatedSelect * Fix prettier
1 parent 6262839 commit 0ffb736

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/fuselage/src/components/SelectPaginated/PaginatedSelect.js

+7
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ const Focus = React.forwardRef((props, ref) => (
3636
/>
3737
));
3838

39+
const prevent = (e) => {
40+
e.preventDefault();
41+
e.stopPropagation();
42+
e.nativeEvent.stopImmediatePropagation();
43+
};
44+
3945
const useDidUpdate = (func = []) => {
4046
const didMount = useRef(false);
4147
const fn = useMutableCallback(func);
@@ -153,6 +159,7 @@ export const PaginatedSelect = ({
153159
options={options}
154160
onSelect={internalChangedByClick}
155161
endReached={endReached}
162+
onMouseDown={prevent}
156163
/>
157164
</PositionAnimated>
158165
</Box>

0 commit comments

Comments
 (0)