Search uses string includes instead of startsWith

This commit is contained in:
Laurent Nguyen 2024-06-20 16:40:04 +02:00
parent 9945304e18
commit c0a79c1e67
1 changed files with 1 additions and 1 deletions

View File

@ -357,7 +357,7 @@ export const DocumentsTableComponent: React.FC<IDocumentsTableComponentProps> =
if (unnamedGroup.length > 0) {
menuList.push(
...unnamedGroup
.filter((def) => !columnSearchText || def.label.toLowerCase().startsWith(columnSearchText.toLowerCase()))
.filter((def) => !columnSearchText || def.label.toLowerCase().includes(columnSearchText.toLowerCase()))
.map((column) => (
<MenuItemCheckbox key={column.id} name={COLUMNS_MENU_NAME} value={column.id}>
{column.label}