From 4eb182344301ee4438a3733ae63f00be5fc959de Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Mon, 8 Dec 2025 22:24:05 +0100 Subject: [PATCH 1/2] Add parameter to activity control action to set the state of its button --- CHANGELOG.md | 5 +++++ src/cmem/ActivityControl/ActivityControlWidget.tsx | 3 +++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7e850f83..bc3927408 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p This is a major release, and it might be not compatible with your current usage of our library. Please read about the necessary changes in the section about how to migrate. +### Added + +- `` + - Add parameter `active` to activity control action to set the `active` state of its button. + ### Migration from v24 to v25 - remove deprecated components, properties and imports from your project, if the info cannot be found here then it was already mentioned in **Deprecated** sections of the past changelogs diff --git a/src/cmem/ActivityControl/ActivityControlWidget.tsx b/src/cmem/ActivityControl/ActivityControlWidget.tsx index efda5060f..86018ded6 100644 --- a/src/cmem/ActivityControl/ActivityControlWidget.tsx +++ b/src/cmem/ActivityControl/ActivityControlWidget.tsx @@ -105,6 +105,8 @@ export interface ActivityControlWidgetAction extends TestableComponent { disabled?: boolean; // Warning state hasStateWarning?: boolean; + // Active state + active?: boolean } interface IActivityMenuAction extends ActivityControlWidgetAction { @@ -228,6 +230,7 @@ export function ActivityControlWidget(props: ActivityControlWidgetProps) { hoverOpenDelay: 200, placement: "bottom", }} + active={action.active} /> ); })} From c9d00c95f003f6761e966d65e36b01371847b159 Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Wed, 10 Dec 2025 13:14:01 +0100 Subject: [PATCH 2/2] MultiSelect: Change default filter predicate to match multi-word queries --- CHANGELOG.md | 5 +++++ src/components/MultiSelect/MultiSelect.tsx | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc3927408..ad49ce2f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,11 @@ This is a major release, and it might be not compatible with your current usage - `` - Add parameter `active` to activity control action to set the `active` state of its button. +### Changed + +- ``: + - Change default filter predicate to match multi-word queries. + ### Migration from v24 to v25 - remove deprecated components, properties and imports from your project, if the info cannot be found here then it was already mentioned in **Deprecated** sections of the past changelogs diff --git a/src/components/MultiSelect/MultiSelect.tsx b/src/components/MultiSelect/MultiSelect.tsx index 3685ed862..eb0f07c1f 100644 --- a/src/components/MultiSelect/MultiSelect.tsx +++ b/src/components/MultiSelect/MultiSelect.tsx @@ -10,7 +10,15 @@ import { removeExtraSpaces } from "../../common/utils/stringUtils"; import { CLASSPREFIX as eccgui } from "../../configuration/constants"; import { TestableComponent } from "../interfaces"; -import { ContextOverlayProps, Highlighter, IconButton, MenuItem, OverflowText, Spinner } from "./../../index"; +import { + ContextOverlayProps, + Highlighter, + highlighterUtils, + IconButton, + MenuItem, + OverflowText, + Spinner +} from "./../../index"; export interface MultiSuggestFieldSelectionProps { newlySelected?: T; @@ -53,7 +61,7 @@ interface MultiSuggestFieldCommonProps /** * prop to listen for query changes, when text is entered in the multi-select input */ - runOnQueryChange?: (query: string) => Promise; + runOnQueryChange?: (query: string) => Promise | (T[] | undefined); /** * Whether the component should take up the full width of its container. * This overrides `tagInputProps.fill`. @@ -265,7 +273,8 @@ export function MultiSuggestField({ }; const defaultFilterPredicate = (item: T, query: string) => { - return itemLabel(item).toLowerCase().includes(query); + const searchWords = highlighterUtils.extractSearchWords(query, true) + return highlighterUtils.matchesAllWords(itemLabel(item).toLowerCase(), searchWords) }; /**