Skip to content

Commit 76c1fcc

Browse files
committed
Change left menu filtering from startsWith -> includes
1 parent fc4f1a1 commit 76c1fcc

File tree

1 file changed

+3
-3
lines changed
  • packages/core/admin/admin/src/content-manager/components

1 file changed

+3
-3
lines changed

packages/core/admin/admin/src/content-manager/components/LeftMenu.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const LeftMenu = () => {
2222
);
2323
const singleTypeLinks = useTypedSelector((state) => state['content-manager_app'].singleTypeLinks);
2424

25-
const { startsWith } = useFilter(locale, {
25+
const { includes } = useFilter(locale, {
2626
sensitivity: 'base',
2727
});
2828

@@ -57,7 +57,7 @@ const LeftMenu = () => {
5757
/**
5858
* Filter by the search value
5959
*/
60-
.filter((link) => startsWith(link.title, search))
60+
.filter((link) => includes(link.title, search))
6161
/**
6262
* Sort correctly using the language
6363
*/
@@ -72,7 +72,7 @@ const LeftMenu = () => {
7272
};
7373
}),
7474
})),
75-
[collectionTypeLinks, search, singleTypeLinks, startsWith, formatMessage, formatter]
75+
[collectionTypeLinks, search, singleTypeLinks, includes, formatMessage, formatter]
7676
);
7777

7878
const handleClear = () => {

0 commit comments

Comments
 (0)