From 152985db7fbe965b0f12a8b7fed1011d7acbafc1 Mon Sep 17 00:00:00 2001 From: Olga Polikashina Date: Fri, 12 Apr 2024 10:41:57 +0300 Subject: [PATCH] fix: prevent deselection of required table column items --- .../hoc/withTableSettings/TableColumnSetup/TableColumnSetup.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Table/hoc/withTableSettings/TableColumnSetup/TableColumnSetup.tsx b/src/components/Table/hoc/withTableSettings/TableColumnSetup/TableColumnSetup.tsx index 4965d10b6f..08c170f7be 100644 --- a/src/components/Table/hoc/withTableSettings/TableColumnSetup/TableColumnSetup.tsx +++ b/src/components/Table/hoc/withTableSettings/TableColumnSetup/TableColumnSetup.tsx @@ -342,7 +342,7 @@ export const TableColumnSetup = (props: TableColumnSetupProps) => { setItems((prevItems) => { return prevItems.map((item) => ({ ...item, - isSelected: selectedItemsIds.includes(item.id), + isSelected: item.isRequired || selectedItemsIds.includes(item.id), })); }); };