1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Merge branch 'dev' of github.com:laurent22/joplin into dev

This commit is contained in:
Laurent Cozic 2021-04-24 19:32:31 +02:00
commit 920f54f5d3

View File

@ -80,6 +80,11 @@ function SearchBar(props: Props) {
}, [props.selectedNoteId]); }, [props.selectedNoteId]);
function onChange(event: any) { function onChange(event: any) {
if (event.value.length === 0) {
// Revert to previous state if query string becomes empty
void onExitSearch();
return;
}
setSearchStarted(true); setSearchStarted(true);
setQuery(event.value); setQuery(event.value);
} }