@gridsuite/commons-ui 0.76.0 → 0.76.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { Autocomplete } from "@mui/material";
2
+ import { createFilterOptions, Autocomplete } from "@mui/material";
3
3
  import { useMemo } from "react";
4
4
  import { useIntl } from "react-intl";
5
5
  function ElementSearchInput(props) {
@@ -23,6 +23,14 @@ function ElementSearchInput(props) {
23
23
  PaperComponent
24
24
  } = props;
25
25
  const intl = useIntl();
26
+ const filterOptions = useMemo(
27
+ () => createFilterOptions({
28
+ matchFrom: "any",
29
+ trim: true,
30
+ ignoreCase: true
31
+ }),
32
+ []
33
+ );
26
34
  const displayedValue = useMemo(() => {
27
35
  if (searchTermDisabled || searchTermDisableReason) {
28
36
  return searchTermDisableReason ?? intl.formatMessage({
@@ -78,7 +86,8 @@ function ElementSearchInput(props) {
78
86
  return option === value;
79
87
  },
80
88
  disabled: searchTermDisabled,
81
- PaperComponent
89
+ PaperComponent,
90
+ filterOptions
82
91
  }
83
92
  );
84
93
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.76.0",
3
+ "version": "0.76.2",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "engines": {
6
6
  "npm": ">=9",