@idds/react 1.2.5 → 1.2.6
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.
package/dist/index.es.js
CHANGED
|
@@ -4986,14 +4986,14 @@ function Table({
|
|
|
4986
4986
|
}
|
|
4987
4987
|
) }),
|
|
4988
4988
|
columns.map((col, index2) => {
|
|
4989
|
-
const
|
|
4989
|
+
const editableColumn = editableColumns.find(
|
|
4990
4990
|
(ec) => ec.accessor === col.accessor
|
|
4991
4991
|
);
|
|
4992
|
+
const isEditable = !!editableColumn;
|
|
4993
|
+
const isDisabled = isEditable && (editableColumn == null ? void 0 : editableColumn.disabled) ? typeof editableColumn.disabled === "function" ? editableColumn.disabled(row) : editableColumn.disabled : false;
|
|
4992
4994
|
const isThisCellEditing = (editingCell == null ? void 0 : editingCell.rowKey) === key && editingCell.accessor === col.accessor;
|
|
4993
|
-
if (isEditable) {
|
|
4994
|
-
const { editor: Editor } =
|
|
4995
|
-
(ec) => ec.accessor === col.accessor
|
|
4996
|
-
);
|
|
4995
|
+
if (isEditable && !isDisabled) {
|
|
4996
|
+
const { editor: Editor } = editableColumn;
|
|
4997
4997
|
const bufferRow = editBuffer[key] ?? row;
|
|
4998
4998
|
return /* @__PURE__ */ jsx(
|
|
4999
4999
|
"td",
|