@idds/vue 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
@@ -8444,6 +8444,15 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
8444
8444
  const isEditable = (col) => {
8445
8445
  return props.editableColumns.some((ec) => ec.accessor === col.accessor);
8446
8446
  };
8447
+ const isCellDisabled = (col, row) => {
8448
+ const editableCol = props.editableColumns.find(
8449
+ (ec) => ec.accessor === col.accessor
8450
+ );
8451
+ if (!editableCol || !editableCol.disabled) {
8452
+ return false;
8453
+ }
8454
+ return typeof editableCol.disabled === "function" ? editableCol.disabled(row) : editableCol.disabled;
8455
+ };
8447
8456
  const getEditorComponent = (col) => {
8448
8457
  const editableCol = props.editableColumns.find(
8449
8458
  (ec) => ec.accessor === col.accessor
@@ -8671,10 +8680,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
8671
8680
  var _a, _b;
8672
8681
  return openBlock(), createElementBlock("td", {
8673
8682
  key: `${String(row[__props.rowKey])}-${col.accessor}-${colIndex}`,
8674
- tabindex: isEditable(col) && ((_a = editingCell.value) == null ? void 0 : _a.rowKey) === String(row[__props.rowKey]) && editingCell.value.accessor === col.accessor ? 0 : void 0,
8683
+ tabindex: isEditable(col) && !isCellDisabled(col, row) && ((_a = editingCell.value) == null ? void 0 : _a.rowKey) === String(row[__props.rowKey]) && editingCell.value.accessor === col.accessor ? 0 : void 0,
8675
8684
  class: "ina-table__cell"
8676
8685
  }, [
8677
- isEditable(col) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
8686
+ isEditable(col) && !isCellDisabled(col, row) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
8678
8687
  ((_b = editingCell.value) == null ? void 0 : _b.rowKey) === String(row[__props.rowKey]) && editingCell.value.accessor === col.accessor ? (openBlock(), createBlock(resolveDynamicComponent(getEditorComponent(col)), {
8679
8688
  key: 0,
8680
8689
  row,