Skip to content

Commit a69c5e4

Browse files
authored
feat(AnalyticalTable): add indeterminate state to select-all checkbox (#1949)
1 parent c10a704 commit a69c5e4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/main/src/components/AnalyticalTable/hooks/useRowSelectionColumn.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,15 @@ const Header = ({
3838
if (selectionMode === TableSelectionMode.SINGLE_SELECT) {
3939
return null;
4040
}
41-
return <CheckBox {...getToggleAllRowsSelectedProps()} style={customCheckBoxStyling} onChange={onChange} />;
41+
const checkBoxProps = getToggleAllRowsSelectedProps();
42+
return (
43+
<CheckBox
44+
{...checkBoxProps}
45+
style={customCheckBoxStyling}
46+
onChange={onChange}
47+
checked={checkBoxProps.indeterminate ? true : checkBoxProps.checked}
48+
/>
49+
);
4250
};
4351

4452
const Cell = ({ row, webComponentsReactProperties: { selectionBehavior, selectionMode } }) => {

0 commit comments

Comments
 (0)