Skip to content

Commit ff06e32

Browse files
authored
Avoid memoizing render textfield in Picker (#3181)
1 parent ee857c9 commit ff06e32

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/components/picker/index.tsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ const Picker = React.forwardRef((props: PickerProps, ref) => {
196196
}
197197
};
198198

199-
const renderTextField = useCallback(() => {
199+
const renderTextField = () => {
200200
return renderInput ? (
201201
// @ts-expect-error - hopefully will be solved after the picker migration ends
202202
renderInput(value, label)
@@ -218,17 +218,7 @@ const Picker = React.forwardRef((props: PickerProps, ref) => {
218218
{pickerInnerInput}
219219
</TextField>
220220
);
221-
}, [
222-
renderInput,
223-
pickerRef,
224-
propsByFieldType,
225-
containerStyle,
226-
labelStyle,
227-
accessibilityInfo,
228-
label,
229-
pickerInnerInput,
230-
testID
231-
]);
221+
};
232222

233223
const expandableModalContent = useMemo(() => {
234224
const useItems = useWheelPicker || propItems;

0 commit comments

Comments
 (0)