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

Desktop: Resolves #4736: Note list is empty if search field is cleared (#4739)

This commit is contained in:
Apoorva Shukla 2021-04-24 22:00:07 +05:30 committed by GitHub
parent 108b5b4cdc
commit 1501238730
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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