mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-25 15:06:55 +00:00
Don't allow unselecting last column
This commit is contained in:
parent
ea2ab19518
commit
9efbe7d056
@ -35,6 +35,10 @@ export const TableColumnSelectionPane: React.FC<TableColumnSelectionPaneProps> =
|
||||
if (checked) {
|
||||
selectedColumnIdsSet.add(id);
|
||||
} else {
|
||||
if (selectedColumnIdsSet.size === 1 && selectedColumnIdsSet.has(id)) {
|
||||
// Don't allow unchecking the last column
|
||||
return;
|
||||
}
|
||||
selectedColumnIdsSet.delete(id);
|
||||
}
|
||||
setNewSelectedColumnIds([...selectedColumnIdsSet]);
|
||||
|
Loading…
Reference in New Issue
Block a user