Skip to content

Commit 28cbf5f

Browse files
authored
Merge pull request #34 from editor-js/fix/search-query
Fix search showing nothing when query is an empty string
2 parents 31ca7a0 + 2374f06 commit 28cbf5f

3 files changed

Lines changed: 2 additions & 2 deletions

File tree

.yarn/install-state.gz

3 Bytes
Binary file not shown.

packages/ui-kit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@editorjs/ui-kit",
33
"description": "UI Components for Editor.js",
44
"packageManager": "yarn@4.4.0",
5-
"version": "1.1.0",
5+
"version": "1.1.1",
66
"type": "module",
77
"main": "dist/index.js",
88
"types": "dist/src/index.d.ts",

packages/ui-kit/src/popover/components/search-input/search-input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,6 @@ export class SearchInput extends EventsDispatcher<SearchInputEventMap> {
131131
const text = item.title === undefined ? '' : item.title.toLowerCase();
132132
const query = this.searchQuery?.toLowerCase();
133133

134-
return query !== undefined ? text.includes(query) : false;
134+
return query !== undefined && query !== '' ? text.includes(query) : false;
135135
}
136136
}

0 commit comments

Comments
 (0)