ViewModeSelection double selection fix

master
Tudor Stanciu 2023-03-24 01:33:37 +02:00
parent 4195456227
commit 1ad78b3ef1
1 changed files with 6 additions and 1 deletions

View File

@ -43,7 +43,11 @@ const ViewModeSelection = ({ callback }) => {
exclusive
onChange={handleViewModeSelection}
>
<ToggleButton value={ViewModes.TABLE} aria-label="table view mode">
<ToggleButton
value={ViewModes.TABLE}
aria-label="table view mode"
disabled={state.mode === ViewModes.TABLE}
>
<Tooltip title={t("ViewModes.Table")}>
<TableChartIcon />
</Tooltip>
@ -51,6 +55,7 @@ const ViewModeSelection = ({ callback }) => {
<ToggleButton
value={ViewModes.ACCORDION}
aria-label="accordion view mode"
disabled={state.mode === ViewModes.ACCORDION}
>
<Tooltip title={t("ViewModes.List")}>
<ViewListIcon />