From 7e61bac3ba725f6ba302480426f2f822229ada4f Mon Sep 17 00:00:00 2001 From: Edward Brunton <42774600+EdwardBrunton@users.noreply.github.com> Date: Tue, 30 Apr 2024 09:01:40 +0200 Subject: [PATCH] fix: :bug: Changed filter popover search to search full text not only the beginning (#612) --- packages/filter/package.json | 2 +- .../filterGroupPopoverMenu/FilterGroupPopoverMenu.tsx | 2 +- packages/workspace-fusion/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/filter/package.json b/packages/filter/package.json index e6c3018a3..7b52e0ff4 100644 --- a/packages/filter/package.json +++ b/packages/filter/package.json @@ -1,6 +1,6 @@ { "name": "@equinor/workspace-filter", - "version": "4.0.1", + "version": "4.0.2", "type": "module", "sideEffects": false, "license": "MIT", diff --git a/packages/filter/src/lib/components/filterGroupPopoverMenu/FilterGroupPopoverMenu.tsx b/packages/filter/src/lib/components/filterGroupPopoverMenu/FilterGroupPopoverMenu.tsx index e23901c65..3e181b7ad 100644 --- a/packages/filter/src/lib/components/filterGroupPopoverMenu/FilterGroupPopoverMenu.tsx +++ b/packages/filter/src/lib/components/filterGroupPopoverMenu/FilterGroupPopoverMenu.tsx @@ -44,7 +44,7 @@ export const FilterGroupPopoverMenu = ({ const handleInput = (e) => setSearchText(e.target.value.toString().toLowerCase()); const getValuesMatchingSearchText = () => - values.filter((s) => !searchText || s.value?.toString().toLowerCase().startsWith(searchText)); + values.filter((s) => !searchText || s.value?.toString().toLowerCase().includes(searchText)); /** * Sets the filter state to the values matching search and closes popover diff --git a/packages/workspace-fusion/package.json b/packages/workspace-fusion/package.json index 4954a2938..b4ea92921 100644 --- a/packages/workspace-fusion/package.json +++ b/packages/workspace-fusion/package.json @@ -1,6 +1,6 @@ { "name": "@equinor/workspace-fusion", - "version": "9.0.1", + "version": "9.0.2", "type": "module", "sideEffects": false, "license": "MIT",