We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45fdee5 commit 4ef78cdCopy full SHA for 4ef78cd
1 file changed
src/@next/IndexTable/IndexTable.tsx
@@ -14,6 +14,7 @@ import { CheckboxCellContentContainer } from './components/Checkbox/CheckboxStyl
14
type IndexTableProps = Omit<PolarisIndexTableProps, 'emptySearchTitle'> & {
15
height?: string;
16
selectableItemsCount?: number;
17
+ showCheckbox?: boolean;
18
};
19
20
const IndexTable = ({
@@ -25,6 +26,7 @@ const IndexTable = ({
25
26
loading,
27
emptyState,
28
selectableItemsCount,
29
+ showCheckbox = true,
30
...props
31
}: IndexTableProps) => {
32
const renderCheckboxHeader = ({
@@ -45,7 +47,10 @@ const IndexTable = ({
45
47
);
46
48
49
- const checkbox = !loading && itemCount > 0 ? renderCheckboxHeader : undefined;
50
+ const checkbox =
51
+ !loading && showCheckbox && itemCount > 0
52
+ ? renderCheckboxHeader
53
+ : undefined;
54
55
return (
56
<>
0 commit comments