Skip to content

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.

Give it the remaining room with containerStyle={{ flex: 1 }}. See In a header.

Catch it in onSearch and render a state for it. See Live search.

See Hide on scroll.

Set placeholderCollapsedMargin to half its width, and searchIconCollapsedMargin 10 more. Or use placeholderAlign="left".

For the clear button. Width and padding are layout properties, which React Native cannot animate natively.

Give it inputTestID, cancelButtonTestID and clearButtonTestID. Pass animated={false} in tests.