Skip to content

Commit 57e99ce

Browse files
committed
Differentiate between sort buttons
Differentiate between sort buttons for array tables and sort buttons for array layouts to allow globally switching on/off either of them without the other.
1 parent 83e7003 commit 57e99ce

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/material/src/complex/MaterialTableControl.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ const TableRows = ({
370370
moveDownCreator={moveDown}
371371
enableUp={index !== 0}
372372
enableDown={index !== data - 1}
373-
showSortButtons={appliedUiSchemaOptions.showSortButtons}
373+
showSortButtons={appliedUiSchemaOptions.showSortButtons || appliedUiSchemaOptions.showArrayTableSortButtons}
374374
enabled={enabled}
375375
cells={cells}
376376
path={path}

packages/material/src/layouts/ExpandPanelRenderer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ const ExpandPanelRendererComponent = (props: ExpandPanelProps) => {
119119
);
120120

121121
const appliedUiSchemaOptions = merge({}, config, uischema.options);
122+
const showSortButtons = appliedUiSchemaOptions.showSortButtons || appliedUiSchemaOptions.showArrayLayoutSortButtons;
122123

123124
return (
124125
<Accordion
@@ -147,7 +148,7 @@ const ExpandPanelRendererComponent = (props: ExpandPanelProps) => {
147148
justifyContent='center'
148149
alignItems='center'
149150
>
150-
{appliedUiSchemaOptions.showSortButtons ? (
151+
{showSortButtons ? (
151152
<Fragment>
152153
<Grid item>
153154
<IconButton

0 commit comments

Comments
 (0)