@omniumretail/component-library 1.3.11 → 1.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -24859,7 +24859,8 @@ const ResponsiveTable = (props) => {
|
|
|
24859
24859
|
cellSelectionStyle,
|
|
24860
24860
|
renderSelectedCell,
|
|
24861
24861
|
useOrderedCellSelection = true,
|
|
24862
|
-
initialSelectedCells
|
|
24862
|
+
initialSelectedCells,
|
|
24863
|
+
selectedCellColor
|
|
24863
24864
|
} = props;
|
|
24864
24865
|
const [customFilters, setCustomFilters] = useState([]);
|
|
24865
24866
|
const [customColumns, setCustomColumns] = useState([]);
|
|
@@ -24923,6 +24924,11 @@ const ResponsiveTable = (props) => {
|
|
|
24923
24924
|
}
|
|
24924
24925
|
}
|
|
24925
24926
|
}, [cleanCellSelection]);
|
|
24927
|
+
useEffect(() => {
|
|
24928
|
+
if (initialSelectedCells && initialSelectedCells.length > 0) {
|
|
24929
|
+
setSelectedCells(initialSelectedCells);
|
|
24930
|
+
}
|
|
24931
|
+
}, [initialSelectedCells]);
|
|
24926
24932
|
const onSelectChange = (newSelectedRowKeys) => {
|
|
24927
24933
|
if (rowSelection.type === "radio") {
|
|
24928
24934
|
setselectedRowKeys(newSelectedRowKeys);
|
|
@@ -25039,7 +25045,7 @@ const ResponsiveTable = (props) => {
|
|
|
25039
25045
|
if (!useOrderedCellSelection) {
|
|
25040
25046
|
const cellContent = (() => {
|
|
25041
25047
|
if (isSelected) {
|
|
25042
|
-
return /* @__PURE__ */ jsx(Tag, { color:
|
|
25048
|
+
return /* @__PURE__ */ jsx(Tag, { color: selectedCellColor, style: { margin: -4 }, children: "X" });
|
|
25043
25049
|
}
|
|
25044
25050
|
if (originalCellContent) {
|
|
25045
25051
|
return /* @__PURE__ */ jsx(Tag, { color: originalCellContent.color, style: { margin: -4 }, children: originalCellContent.type });
|