@omniumretail/component-library 1.3.33 → 1.3.35

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.
@@ -25086,21 +25086,27 @@ const ResponsiveTable = (props) => {
25086
25086
  const cellIndex2 = selectedCells.findIndex(
25087
25087
  (cell) => cell.rowKey === record[rowKeyValue] && cell.columnKey === key
25088
25088
  );
25089
+ const isSelected2 = cellIndex2 !== -1;
25089
25090
  const getBackgroundColor = () => {
25090
- if (!originalCellContent2?.type) return void 0;
25091
- if (originalCellContent2.type === "F") {
25092
- return originalCellContent2.color;
25091
+ if (templateEditMode && isSelected2) {
25092
+ const selectedCell = selectedCells[cellIndex2];
25093
+ const cellType = selectedCell?.value?.type;
25094
+ if (cellType === "F" || cellType === "S" || cellType === "D") {
25095
+ return selectedCell?.value?.color;
25096
+ }
25097
+ return void 0;
25093
25098
  }
25094
- if (originalCellContent2.type === "S") {
25095
- return originalCellContent2.color;
25099
+ if (templateEditMode && !isSelected2) {
25100
+ return void 0;
25096
25101
  }
25097
- if (originalCellContent2.type === "D") {
25098
- return originalCellContent2.color;
25102
+ if (!templateEditMode && originalCellContent2?.type) {
25103
+ if (originalCellContent2.type === "F") return originalCellContent2.color;
25104
+ if (originalCellContent2.type === "S") return originalCellContent2.color;
25105
+ if (originalCellContent2.type === "D") return originalCellContent2.color;
25099
25106
  }
25100
25107
  return void 0;
25101
25108
  };
25102
25109
  const cellBackgroundColor = getBackgroundColor();
25103
- const isSelected2 = cellIndex2 !== -1;
25104
25110
  if (isDisabled) {
25105
25111
  if (originalCellContent2?.type === "I" || originalCellContent2?.type === "L" || isReadonly) {
25106
25112
  return /* @__PURE__ */ jsx(Tag, { color: originalCellContent2.color, style: { margin: -4, cursor: "not-allowed" }, children: originalCellContent2.type });