palette/fix: Fixed case-search issue

This commit is contained in:
Alexander Moiseenko
2020-06-12 00:21:21 +03:00
parent 1e7d8b9606
commit 96bcfe145f

View File

@@ -305,7 +305,10 @@ export class Palette implements OnInit, OnDestroy {
if (cell.get('header')) {
paletteNodes.push(cell);
} else if (metadata && metadata.group && metadata.name
&& (!filterText || metadata.group.indexOf(filterText) >= 0 || metadata.name.indexOf(filterText) >= 0)) {
&& (!filterText
|| metadata.group.toLocaleLowerCase().indexOf(filterText) >= 0
|| metadata.name.toLocaleLowerCase().indexOf(filterText) >= 0)
) {
if (!this.closedGroups.has(metadata.group)) {
cell.attr('./display', 'block');
cell.removeAttr('./display');