From 596e9f3b0482a5839911c045eea3d77cdcea9032 Mon Sep 17 00:00:00 2001 From: imikulec Date: Tue, 30 Jan 2024 09:34:48 +0100 Subject: [PATCH] #182 - Rename prop enableMultiSort to multiSort --- libs/data-display/src/DataTable.tsx | 6 +++--- storybook/src/data-display/DataTable.mdx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/data-display/src/DataTable.tsx b/libs/data-display/src/DataTable.tsx index 54856df..1286fc3 100644 --- a/libs/data-display/src/DataTable.tsx +++ b/libs/data-display/src/DataTable.tsx @@ -131,7 +131,7 @@ export type DataTableProps = { * Enable or disable multi-column sorting. * When set to true, users can sort by multiple columns simultaneously. */ - enableMultiSort?: boolean; + multiSort?: boolean; } & DataTableTokensProps; type DataTableTokensProps = { @@ -469,7 +469,7 @@ function DataTable({ firstColumnFixed, lastColumnFixed, className, - enableMultiSort = false, + multiSort = false, ...props }: DataTableProps) { const primaryRow = findChild("DataTablePrimaryRow", children); @@ -622,7 +622,7 @@ function DataTable({ className={tableHeaderClassName} title={column.title} onClick={() => { - toggleSortBy(column.id, undefined, enableMultiSort); + toggleSortBy(column.id, undefined, multiSort); }} > diff --git a/storybook/src/data-display/DataTable.mdx b/storybook/src/data-display/DataTable.mdx index 5802699..779902c 100644 --- a/storybook/src/data-display/DataTable.mdx +++ b/storybook/src/data-display/DataTable.mdx @@ -211,9 +211,9 @@ To enable multi-column sorting, follow these steps: }, [dataTableState.sortBy]); ``` -**3.** Set the `enableMultiSort` prop to `true` in the DataTable component to enable multi-column sorting: +**3.** Set the `multiSort` prop to `true` in the DataTable component to enable multi-column sorting: ```tsx - +