Troubleshooting
The tab bar moves or leaves a gap when the keyboard opens
Section titled “The tab bar moves or leaves a gap when the keyboard opens”That is Android resizing the window, not the box. With React Navigation set tabBarHideOnKeyboard: true. With Expo, "softwareKeyboardLayoutMode": "pan" in app.json keeps the layout still.
The first tap on a result only closes the keyboard
Section titled “The first tap on a result only closes the keyboard”Set keyboardShouldPersistTaps="handled" on the list.
The box has no width inside a row
Section titled “The box has no width inside a row”Give it the remaining room with containerStyle={{ flex: 1 }}. See In a header.
How do I handle a failed search?
Section titled “How do I handle a failed search?”Catch it in onSearch and render a state for it. See Live search.
How do I hide the box on scroll?
Section titled “How do I hide the box on scroll?”See Hide on scroll.
A long placeholder is not centered
Section titled “A long placeholder is not centered”Set placeholderCollapsedMargin to half its width, and searchIconCollapsedMargin 10 more. Or use placeholderAlign="left".
Is the native driver used?
Section titled “Is the native driver used?”For the clear button. Width and padding are layout properties, which React Native cannot animate natively.
How do I test it?
Section titled “How do I test it?”Give it inputTestID, cancelButtonTestID and clearButtonTestID. Pass animated={false} in tests.