diff --git a/admin/src/pages/View/index.js b/admin/src/pages/View/index.js index 169548b8..21a4b917 100644 --- a/admin/src/pages/View/index.js +++ b/admin/src/pages/View/index.js @@ -83,6 +83,7 @@ const View = () => { const [searchValue, setSearchValue] = useState(''); const [structureChanged, setStructureChanged] = useState(false); const isSearchEmpty = isEmpty(searchValue); + const normalisedSearchValue = (searchValue || '').toLowerCase(); const structureHasErrors = !validateNavigationStructure((changedActiveNavigation || {}).items); @@ -149,7 +150,7 @@ const View = () => { else return [...subItems, ...acc]; }, []); - const filteredList = !isSearchEmpty ? filteredListFactory(changedActiveNavigation.items, (item) => item?.title.includes(searchValue)) : []; + const filteredList = !isSearchEmpty ? filteredListFactory(changedActiveNavigation.items, (item) => (item?.title || '').toLowerCase().includes(normalisedSearchValue)) : []; const changeCollapseItemDeep = (item, isCollapsed) => { if (item.collapsed !== isCollapsed) { diff --git a/package.json b/package.json index 9a72fee1..fed7eea5 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ }, "dependencies": { "@sindresorhus/slugify": "1.1.0", - "@strapi/utils": "^4.3.8", + "@strapi/utils": "^4.5.4", "lodash": "^4.17.11", "pluralize": "^8.0.0", "react": "^16.9.0", @@ -80,7 +80,7 @@ } ], "engines": { - "node": ">=14.19.3 <=17.x.x", + "node": ">=14.19.1 <=18.x.x", "npm": ">=7.x.x" }, "nodemonConfig": {