We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e1734c commit bff96b7Copy full SHA for bff96b7
versioned_docs/version-6.x/native-stack-navigator.md
@@ -384,6 +384,22 @@ React.useLayoutEffect(() => {
384
}, [navigation]);
385
```
386
387
+### `onSearchButtonPress`
388
+
389
+A callback that gets called when the search button is pressed.
390
391
+```js
392
+const [search, setSearch] = React.useState('');
393
394
+React.useLayoutEffect(() => {
395
+ navigation.setOptions({
396
+ headerSearchBarOptions: {
397
+ onSearchButtonPress: (event) => setSearch(event?.nativeEvent?.text),
398
+ },
399
+ });
400
+}, [navigation]);
401
+```
402
403
#### `header`
404
405
Custom header to use instead of the default header.
0 commit comments