Skip to content

Commit 636216d

Browse files
Georgii BerezhnoiGeorgii Berezhnoi
authored andcommitted
Fix search query for the empty string
1 parent 2374f06 commit 636216d

4 files changed

Lines changed: 3 additions & 3 deletions

File tree

.yarn/install-state.gz

0 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.1",
5+
"version": "1.1.2",
66
"type": "module",
77
"main": "dist/index.js",
88
"types": "dist/src/index.d.ts",

packages/ui-kit/preview/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
const popover = new PopoverDesktop(
1111
{
12-
items: [{ title: 'Item 1', onActivate: console.log }],
12+
items: [{ title: 'Item 1', onActivate: console.log, closeOnActivate: true }],
1313
scopeElement: document.body,
1414
searchable: true,
1515
}

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 && query !== '' ? text.includes(query) : false;
134+
return query !== undefined && query === '' ? text.includes(query) : false;
135135
}
136136
}

0 commit comments

Comments
 (0)