Skip to content

Commit

Permalink
Differentiate between sort buttons
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sdirix committed Jun 15, 2022
1 parent 83e7003 commit 57e99ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/material/src/complex/MaterialTableControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ const TableRows = ({
moveDownCreator={moveDown}
enableUp={index !== 0}
enableDown={index !== data - 1}
showSortButtons={appliedUiSchemaOptions.showSortButtons}
showSortButtons={appliedUiSchemaOptions.showSortButtons || appliedUiSchemaOptions.showArrayTableSortButtons}
enabled={enabled}
cells={cells}
path={path}
Expand Down
3 changes: 2 additions & 1 deletion packages/material/src/layouts/ExpandPanelRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const ExpandPanelRendererComponent = (props: ExpandPanelProps) => {
);

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

return (
<Accordion
Expand Down Expand Up @@ -147,7 +148,7 @@ const ExpandPanelRendererComponent = (props: ExpandPanelProps) => {
justifyContent='center'
alignItems='center'
>
{appliedUiSchemaOptions.showSortButtons ? (
{showSortButtons ? (
<Fragment>
<Grid item>
<IconButton
Expand Down

0 comments on commit 57e99ce

Please sign in to comment.