Switch icons and search compare with lowercase.

This commit is contained in:
Laurent Nguyen 2024-06-20 16:36:01 +02:00
parent 0ce9acdfdf
commit 9945304e18

View File

@ -34,7 +34,7 @@ import {
useTableFeatures, useTableFeatures,
useTableSelection, useTableSelection,
} from "@fluentui/react-components"; } from "@fluentui/react-components";
import { Add16Regular, Dismiss12Regular } from "@fluentui/react-icons"; import { Add16Regular, Subtract12Regular } from "@fluentui/react-icons";
import { NormalizedEventKey } from "Common/Constants"; import { NormalizedEventKey } from "Common/Constants";
import { selectionHelper } from "Explorer/Tabs/DocumentsTabV2/SelectionHelper"; import { selectionHelper } from "Explorer/Tabs/DocumentsTabV2/SelectionHelper";
import { isEnvironmentCtrlPressed, isEnvironmentShiftPressed } from "Utils/KeyboardUtils"; import { isEnvironmentCtrlPressed, isEnvironmentShiftPressed } from "Utils/KeyboardUtils";
@ -157,8 +157,8 @@ export const DocumentsTableComponent: React.FC<IDocumentsTableComponentProps> =
appearance="transparent" appearance="transparent"
aria-label="De-select column" aria-label="De-select column"
size="small" size="small"
icon={<Dismiss12Regular />} icon={<Subtract12Regular />}
style={{ position: "absolute", right: 0 }} style={{ position: "absolute", right: -8 }}
onClick={() => { onClick={() => {
// Remove column id from selectedColumnIds // Remove column id from selectedColumnIds
const index = selectedColumnIds.indexOf(column.id); const index = selectedColumnIds.indexOf(column.id);
@ -357,7 +357,7 @@ export const DocumentsTableComponent: React.FC<IDocumentsTableComponentProps> =
if (unnamedGroup.length > 0) { if (unnamedGroup.length > 0) {
menuList.push( menuList.push(
...unnamedGroup ...unnamedGroup
.filter((def) => !columnSearchText || def.label.startsWith(columnSearchText)) .filter((def) => !columnSearchText || def.label.toLowerCase().startsWith(columnSearchText.toLowerCase()))
.map((column) => ( .map((column) => (
<MenuItemCheckbox key={column.id} name={COLUMNS_MENU_NAME} value={column.id}> <MenuItemCheckbox key={column.id} name={COLUMNS_MENU_NAME} value={column.id}>
{column.label} {column.label}