Skip to content

Commit 003f8c5

Browse files
committed
Minor picker fixes
1 parent 3e929d6 commit 003f8c5

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/components/picker/new.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ const Picker = (props: PropsWithChildren<PickerProps> & ForwardRefInjectedProps
9393
placeholder: props.placeholder
9494
});
9595

96-
const onSelectedItemLayout = (event: LayoutChangeEvent) => {
96+
const onSelectedItemLayout = useCallback((event: LayoutChangeEvent) => {
9797
const y = event.nativeEvent.layout.y;
9898
setSelectedItemPosition(y);
99-
};
99+
}, []);
100100

101101
const contextValue = useMemo(() => {
102102
const pickerValue = !migrate && typeof value === 'object' && !_.isArray(value) ? value?.value : value;
@@ -176,7 +176,6 @@ const Picker = (props: PropsWithChildren<PickerProps> & ForwardRefInjectedProps
176176
testID,
177177
mode,
178178
selectedItemPosition,
179-
enableModalBlur,
180179
topBarProps,
181180
cancelSelect,
182181
onDoneSelecting,
@@ -187,10 +186,7 @@ const Picker = (props: PropsWithChildren<PickerProps> & ForwardRefInjectedProps
187186
_onSearchChange,
188187
renderCustomSearch,
189188
listProps,
190-
onShow,
191-
pickerModalProps,
192-
filteredChildren,
193-
props
189+
filteredChildren
194190
]);
195191

196192
if (useNativePicker) {

0 commit comments

Comments
 (0)