mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
fix search results not clear on navigate.
This commit is contained in:
@@ -30,6 +30,7 @@ import {eSendEvent} from '../../services/eventManager';
|
||||
import {eOpenModalMenu, eSendSideMenuOverlayRef} from '../../services/events';
|
||||
import NavigationService from '../../services/NavigationService';
|
||||
import {timeSince, getElevation, hexToRGBA} from '../../utils/utils';
|
||||
import {inputRef} from '../SearchInput';
|
||||
|
||||
export const Menu = ({
|
||||
close = () => {},
|
||||
@@ -201,7 +202,12 @@ export const Menu = ({
|
||||
activeOpacity={opacity / 2}
|
||||
onPress={() => {
|
||||
item.close === false ? null : close();
|
||||
|
||||
if (item.close) {
|
||||
inputRef.current?.setNativeProps({
|
||||
text: '',
|
||||
});
|
||||
dispatch({type: ACTIONS.SEARCH_RESULTS, results: []});
|
||||
}
|
||||
item.func();
|
||||
}}
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user