diff --git a/CHANGELOG.md b/CHANGELOG.md
index a7e850f83..ad49ce2f1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,16 @@ 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.
+
+### 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/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}
/>
);
})}
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)
};
/**