diff --git a/Example/src/screens/SearchBar.tsx b/Example/src/screens/SearchBar.tsx index 37ddd7380c..799c61b69b 100644 --- a/Example/src/screens/SearchBar.tsx +++ b/Example/src/screens/SearchBar.tsx @@ -46,6 +46,7 @@ const MainScreen = ({ navigation }: MainScreenProps): JSX.Element => { const [autoCapitalize, setAutoCapitalize] = useState('sentences'); const [inputType, setInputType] = useState('text'); + const [shouldClearOnSubmit, setShouldClearOnSubmit] = useState(false); const searchBarRef = useRef(null); useLayoutEffect(() => { @@ -62,6 +63,7 @@ const MainScreen = ({ navigation }: MainScreenProps): JSX.Element => { autoCapitalize, placeholder, inputType, + shouldClearOnSubmit, onChangeText: event => setSearch(event.nativeEvent.text), onCancelButtonPress: () => toast.push({ @@ -108,6 +110,7 @@ const MainScreen = ({ navigation }: MainScreenProps): JSX.Element => { hideNavigationBar, autoCapitalize, inputType, + shouldClearOnSubmit, ]); return ( @@ -172,6 +175,11 @@ const MainScreen = ({ navigation }: MainScreenProps): JSX.Element => { value={shouldShowHintSearchIcon} onValueChange={setShouldShowHintSearchIcon} /> + Imperative actions