@canvas-components/list-table 0.3.35 → 0.3.36

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.cjs CHANGED
@@ -5314,6 +5314,31 @@ function drawHeaderActionGlyph(ctx, rect, actionType, color = "#8c8c8c", sortOrd
5314
5314
  }
5315
5315
  ctx.restore();
5316
5316
  }
5317
+ function drawHeaderEditMarker(ctx, headerRect) {
5318
+ const size = Math.max(0, Math.min(10, headerRect.width - 2, headerRect.height - 2));
5319
+ const rect = { x: headerRect.x + 1, y: headerRect.y + 1, width: size, height: size };
5320
+ if (size > 0) {
5321
+ ctx.save();
5322
+ ctx.fillStyle = "rgba(22, 119, 255, 0.08)";
5323
+ ctx.beginPath();
5324
+ const { x, y } = rect;
5325
+ const radius = Math.min(4, size / 2);
5326
+ if (typeof ctx.arcTo === "function") {
5327
+ ctx.moveTo(x + radius, y);
5328
+ ctx.arcTo(x + size, y, x + size, y + size, radius);
5329
+ ctx.arcTo(x + size, y + size, x, y + size, radius);
5330
+ ctx.arcTo(x, y + size, x, y, radius);
5331
+ ctx.arcTo(x, y, x + size, y, radius);
5332
+ ctx.closePath();
5333
+ } else {
5334
+ ctx.rect(x, y, size, size);
5335
+ }
5336
+ ctx.fill();
5337
+ ctx.restore();
5338
+ drawHeaderActionGlyph(ctx, rect, "edit", "#1677ff");
5339
+ }
5340
+ return rect;
5341
+ }
5317
5342
  function drawEditIcon(ctx, rect) {
5318
5343
  const scale = Math.min(rect.width, rect.height) / 14;
5319
5344
  const x = rect.x + (rect.width - 14 * scale) / 2;
@@ -8851,15 +8876,14 @@ function drawHeaderCell(params, cell, clipRect) {
8851
8876
  );
8852
8877
  const isExpandSystemColumn = cell.node.children.length === 0 && cell.node.column.meta?.systemType === "expandable";
8853
8878
  const isRowSelectorSystemColumn = cell.node.children.length === 0 && cell.node.column.meta?.systemType === "rowSelector";
8854
- const isEditableLeaf = cell.node.children.length === 0 && !!cell.node.column.editable && cell.node.column.showEditIcon === true;
8879
+ const isEditableLeaf = cell.node.children.length === 0 && !!cell.node.column.editable && cell.node.column.showEditIcon !== false;
8855
8880
  const visibleState = getHeaderActionVisibilityState(
8856
8881
  cell.node.key,
8857
8882
  params.hoveredColumnKey,
8858
8883
  params.sortState.find((item) => item.key === cell.node.key)?.key ?? null,
8859
8884
  params.filteredColumnKeys,
8860
8885
  params.filterableColumnKeys,
8861
- params.fixedColumnKeys,
8862
- isEditableLeaf
8886
+ params.fixedColumnKeys
8863
8887
  );
8864
8888
  const titleContent = cell.node.titleContent ?? [
8865
8889
  { type: "text", text: cell.node.title }
@@ -8871,7 +8895,6 @@ function drawHeaderCell(params, cell, clipRect) {
8871
8895
  actionVisibilityState: visibleState,
8872
8896
  allowActions: cell.node.children.length === 0,
8873
8897
  hasFilter: params.filterableColumnKeys.has(cell.node.key),
8874
- hasEdit: isEditableLeaf,
8875
8898
  contentWidth: measureHeaderContentWidth(ctx, titleContent),
8876
8899
  paddingInline: cell.node.style?.paddingInline,
8877
8900
  contentInsetStart: resolveHeaderContentInsetStart({
@@ -9038,18 +9061,29 @@ function measureHeaderContentWidth(ctx, contents) {
9038
9061
  ) + Math.max(contents.length - 1, 0) * gap;
9039
9062
  }
9040
9063
  function drawHeaderActions(params, rect, columnKey, visibilityState, fixed, visibleRect = rect, hasEdit = false, selected = false) {
9041
- if (!visibilityState.visible) {
9042
- return;
9043
- }
9044
9064
  const { ctx, descriptors } = params;
9045
9065
  ctx.save();
9046
9066
  ctx.beginPath();
9047
9067
  ctx.rect(visibleRect.x, visibleRect.y, visibleRect.width, visibleRect.height);
9048
9068
  ctx.clip();
9069
+ if (hasEdit) {
9070
+ const hitRect = intersectRects(drawHeaderEditMarker(ctx, rect), visibleRect);
9071
+ if (hitRect) descriptors.push({
9072
+ kind: "header",
9073
+ rect: hitRect,
9074
+ columnKey,
9075
+ fixed,
9076
+ debugNodeType: "header-edit-icon",
9077
+ debugText: "\u5F53\u524D\u5217\u53EF\u7F16\u8F91"
9078
+ });
9079
+ }
9080
+ if (!visibilityState.visible) {
9081
+ ctx.restore();
9082
+ return;
9083
+ }
9049
9084
  const actionLayout = getHeaderActionLayout({
9050
9085
  rect,
9051
9086
  hasFilter: params.filterableColumnKeys.has(columnKey),
9052
- hasEdit,
9053
9087
  visibilityState,
9054
9088
  trailingInset: resolveCollapsedColumnMarkerSet(
9055
9089
  params.collapsedColumnMarkers,
@@ -9080,28 +9114,7 @@ function drawHeaderActions(params, rect, columnKey, visibilityState, fixed, visi
9080
9114
  width: ACTION_SIZE2,
9081
9115
  height: ACTION_SIZE2
9082
9116
  };
9083
- if (actionType === "edit") {
9084
- drawHeaderActionIcon(
9085
- ctx,
9086
- actionRect,
9087
- "edit",
9088
- true,
9089
- false,
9090
- headerSelected,
9091
- params.theme.selectionBackgroundColor
9092
- );
9093
- const hitRect2 = intersectRects(actionRect, visibleRect);
9094
- if (hitRect2)
9095
- descriptors.push({
9096
- kind: "header",
9097
- rect: hitRect2,
9098
- columnKey,
9099
- fixed,
9100
- debugNodeType: "header-edit-icon",
9101
- debugText: "\u5F53\u524D\u5217\u53EF\u7F16\u8F91"
9102
- });
9103
- return;
9104
- }
9117
+ if (actionType === "edit") return;
9105
9118
  const iconHovered = params.hoveredColumnKey === columnKey && params.hoveredActionType === (actionType === "sort" ? "sort-trigger" : actionType === "filter" ? "filter-trigger" : "fixed-trigger");
9106
9119
  drawHeaderActionIcon(
9107
9120
  ctx,
@@ -9254,7 +9267,7 @@ function getHeaderSelectionRect(rect) {
9254
9267
  height: size
9255
9268
  };
9256
9269
  }
9257
- function getHeaderActionVisibilityState(columnKey, hoveredColumnKey, sortedColumnKey, filteredColumnKeys, filterableColumnKeys, fixedColumnKeys, editable) {
9270
+ function getHeaderActionVisibilityState(columnKey, hoveredColumnKey, sortedColumnKey, filteredColumnKeys, filterableColumnKeys, fixedColumnKeys) {
9258
9271
  const hovered = hoveredColumnKey === columnKey;
9259
9272
  const sorted = sortedColumnKey === columnKey;
9260
9273
  const filtered = filterableColumnKeys.has(columnKey) && filteredColumnKeys.has(columnKey);
@@ -9264,7 +9277,7 @@ function getHeaderActionVisibilityState(columnKey, hoveredColumnKey, sortedColum
9264
9277
  sorted,
9265
9278
  filtered,
9266
9279
  fixed,
9267
- visible: hovered || sorted || filtered || fixed || editable
9280
+ visible: hovered || sorted || filtered || fixed
9268
9281
  };
9269
9282
  }
9270
9283
  function getActionActive(actionType, visibilityState) {
@@ -10351,8 +10364,7 @@ function drawBodyNestedTableContent(params) {
10351
10364
  align: column.align ?? "left",
10352
10365
  actionVisibilityState,
10353
10366
  allowActions: true,
10354
- hasFilter: column.allowFilter === true,
10355
- hasEdit: !!column.editable && column.showEditIcon === true
10367
+ hasFilter: column.allowFilter === true
10356
10368
  });
10357
10369
  const headerHighlighted = isNestedTableHeaderHighlighted(
10358
10370
  content,
@@ -10729,11 +10741,27 @@ function drawNestedTableHeaderActions(params) {
10729
10741
  const filtered = highlight?.filterState?.[columnKey] != null;
10730
10742
  const fixed = resolveNestedColumnFixed(column, highlight);
10731
10743
  const headerSelected = highlight?.kind === "header" && isNestedTableRuntimeColumnMatched(highlight, column, columnIndex);
10744
+ if (column.editable && column.showEditIcon !== false) {
10745
+ const markerRect = drawHeaderEditMarker(drawParams.ctx, rect);
10746
+ drawParams.descriptors.push({
10747
+ kind: "body-content",
10748
+ rect: markerRect,
10749
+ columnKey: drawParams.column.key,
10750
+ rowIndex: drawParams.rowIndex,
10751
+ contentIndex: drawParams.contentIndex,
10752
+ contentKey: "nested-table",
10753
+ nestedColumnDataIndex: columnKey,
10754
+ nestedColumnIndex: columnIndex,
10755
+ fixed: drawParams.column.fixed,
10756
+ frozen: drawParams.frozen,
10757
+ debugNodeType: "nested-table-header-edit-icon",
10758
+ debugText: "\u5F53\u524D\u5217\u53EF\u7F16\u8F91"
10759
+ });
10760
+ }
10732
10761
  if (!visibilityState.visible) return;
10733
10762
  const { actionTypes, startX, totalWidth } = getHeaderActionLayout({
10734
10763
  rect,
10735
10764
  hasFilter: column.allowFilter === true,
10736
- hasEdit: !!column.editable && column.showEditIcon === true,
10737
10765
  visibilityState
10738
10766
  });
10739
10767
  drawParams.ctx.save();
@@ -10755,33 +10783,7 @@ function drawNestedTableHeaderActions(params) {
10755
10783
  width: size,
10756
10784
  height: size
10757
10785
  };
10758
- if (actionType === "edit") {
10759
- drawHeaderActionIcon(
10760
- drawParams.ctx,
10761
- actionRect,
10762
- "edit",
10763
- true,
10764
- false,
10765
- headerSelected,
10766
- drawParams.theme.selectionBackgroundColor
10767
- );
10768
- drawParams.descriptors.push({
10769
- kind: "body-content",
10770
- rect: actionRect,
10771
- columnKey: drawParams.column.key,
10772
- rowIndex: drawParams.rowIndex,
10773
- contentIndex: drawParams.contentIndex,
10774
- contentKey: "nested-table",
10775
- nestedColumnDataIndex: columnKey,
10776
- nestedColumnIndex: columnIndex,
10777
- fixed: drawParams.column.fixed,
10778
- frozen: drawParams.frozen,
10779
- debugNodeType: "nested-table-header-edit-icon",
10780
- debugText: "\u5F53\u524D\u5217\u53EF\u7F16\u8F91"
10781
- });
10782
- actionX += size + gap;
10783
- return;
10784
- }
10786
+ if (actionType === "edit") return;
10785
10787
  const active = actionType === "sort" && sortOrder != null || actionType === "filter" && filtered || actionType === "fixed" && fixed != null;
10786
10788
  drawHeaderActionIcon(
10787
10789
  drawParams.ctx,
@@ -10825,7 +10827,7 @@ function resolveNestedTableHeaderActionVisibility(params) {
10825
10827
  sorted,
10826
10828
  filtered,
10827
10829
  fixed,
10828
- visible: hovered || sorted || filtered || fixed || !!column.editable && column.showEditIcon === true
10830
+ visible: hovered || sorted || filtered || fixed
10829
10831
  };
10830
10832
  }
10831
10833
  function isNestedTableRowHighlighted(content, record, rowIndex, highlight, highlightMode) {
package/dist/index.d.cts CHANGED
@@ -959,7 +959,7 @@ interface ListTableNestedTableColumn {
959
959
  align?: ListTableHorizontalAlign;
960
960
  /** 是否允许编辑子表格单元格。 */
961
961
  editable?: ListTableEditable<Record<string, unknown>>;
962
- /** 是否显示可编辑列的表头编辑图标,默认 false;不影响编辑能力。 */
962
+ /** 是否显示可编辑列的表头左上角编辑图标,默认 true;不影响编辑能力。 */
963
963
  showEditIcon?: boolean;
964
964
  /** 子表格单元格编辑器配置。 */
965
965
  formItemProps?: ListTableFormItemProps<Record<string, unknown>>;
@@ -1140,7 +1140,7 @@ interface ListTableColumn<RecordType = Record<string, unknown>> {
1140
1140
  ellipsis?: boolean;
1141
1141
  /** 是否允许进入编辑输入态。 */
1142
1142
  editable?: ListTableEditable<RecordType>;
1143
- /** 是否显示可编辑列的表头编辑图标,默认 false;不影响编辑能力。 */
1143
+ /** 是否显示可编辑列的表头左上角编辑图标,默认 true;不影响编辑能力。 */
1144
1144
  showEditIcon?: boolean;
1145
1145
  /** 编辑器配置,未传时默认使用文本输入。 */
1146
1146
  formItemProps?: ListTableFormItemProps<RecordType>;
package/dist/index.d.ts CHANGED
@@ -959,7 +959,7 @@ interface ListTableNestedTableColumn {
959
959
  align?: ListTableHorizontalAlign;
960
960
  /** 是否允许编辑子表格单元格。 */
961
961
  editable?: ListTableEditable<Record<string, unknown>>;
962
- /** 是否显示可编辑列的表头编辑图标,默认 false;不影响编辑能力。 */
962
+ /** 是否显示可编辑列的表头左上角编辑图标,默认 true;不影响编辑能力。 */
963
963
  showEditIcon?: boolean;
964
964
  /** 子表格单元格编辑器配置。 */
965
965
  formItemProps?: ListTableFormItemProps<Record<string, unknown>>;
@@ -1140,7 +1140,7 @@ interface ListTableColumn<RecordType = Record<string, unknown>> {
1140
1140
  ellipsis?: boolean;
1141
1141
  /** 是否允许进入编辑输入态。 */
1142
1142
  editable?: ListTableEditable<RecordType>;
1143
- /** 是否显示可编辑列的表头编辑图标,默认 false;不影响编辑能力。 */
1143
+ /** 是否显示可编辑列的表头左上角编辑图标,默认 true;不影响编辑能力。 */
1144
1144
  showEditIcon?: boolean;
1145
1145
  /** 编辑器配置,未传时默认使用文本输入。 */
1146
1146
  formItemProps?: ListTableFormItemProps<RecordType>;
package/dist/index.js CHANGED
@@ -5292,6 +5292,31 @@ function drawHeaderActionGlyph(ctx, rect, actionType, color = "#8c8c8c", sortOrd
5292
5292
  }
5293
5293
  ctx.restore();
5294
5294
  }
5295
+ function drawHeaderEditMarker(ctx, headerRect) {
5296
+ const size = Math.max(0, Math.min(10, headerRect.width - 2, headerRect.height - 2));
5297
+ const rect = { x: headerRect.x + 1, y: headerRect.y + 1, width: size, height: size };
5298
+ if (size > 0) {
5299
+ ctx.save();
5300
+ ctx.fillStyle = "rgba(22, 119, 255, 0.08)";
5301
+ ctx.beginPath();
5302
+ const { x, y } = rect;
5303
+ const radius = Math.min(4, size / 2);
5304
+ if (typeof ctx.arcTo === "function") {
5305
+ ctx.moveTo(x + radius, y);
5306
+ ctx.arcTo(x + size, y, x + size, y + size, radius);
5307
+ ctx.arcTo(x + size, y + size, x, y + size, radius);
5308
+ ctx.arcTo(x, y + size, x, y, radius);
5309
+ ctx.arcTo(x, y, x + size, y, radius);
5310
+ ctx.closePath();
5311
+ } else {
5312
+ ctx.rect(x, y, size, size);
5313
+ }
5314
+ ctx.fill();
5315
+ ctx.restore();
5316
+ drawHeaderActionGlyph(ctx, rect, "edit", "#1677ff");
5317
+ }
5318
+ return rect;
5319
+ }
5295
5320
  function drawEditIcon(ctx, rect) {
5296
5321
  const scale = Math.min(rect.width, rect.height) / 14;
5297
5322
  const x = rect.x + (rect.width - 14 * scale) / 2;
@@ -8829,15 +8854,14 @@ function drawHeaderCell(params, cell, clipRect) {
8829
8854
  );
8830
8855
  const isExpandSystemColumn = cell.node.children.length === 0 && cell.node.column.meta?.systemType === "expandable";
8831
8856
  const isRowSelectorSystemColumn = cell.node.children.length === 0 && cell.node.column.meta?.systemType === "rowSelector";
8832
- const isEditableLeaf = cell.node.children.length === 0 && !!cell.node.column.editable && cell.node.column.showEditIcon === true;
8857
+ const isEditableLeaf = cell.node.children.length === 0 && !!cell.node.column.editable && cell.node.column.showEditIcon !== false;
8833
8858
  const visibleState = getHeaderActionVisibilityState(
8834
8859
  cell.node.key,
8835
8860
  params.hoveredColumnKey,
8836
8861
  params.sortState.find((item) => item.key === cell.node.key)?.key ?? null,
8837
8862
  params.filteredColumnKeys,
8838
8863
  params.filterableColumnKeys,
8839
- params.fixedColumnKeys,
8840
- isEditableLeaf
8864
+ params.fixedColumnKeys
8841
8865
  );
8842
8866
  const titleContent = cell.node.titleContent ?? [
8843
8867
  { type: "text", text: cell.node.title }
@@ -8849,7 +8873,6 @@ function drawHeaderCell(params, cell, clipRect) {
8849
8873
  actionVisibilityState: visibleState,
8850
8874
  allowActions: cell.node.children.length === 0,
8851
8875
  hasFilter: params.filterableColumnKeys.has(cell.node.key),
8852
- hasEdit: isEditableLeaf,
8853
8876
  contentWidth: measureHeaderContentWidth(ctx, titleContent),
8854
8877
  paddingInline: cell.node.style?.paddingInline,
8855
8878
  contentInsetStart: resolveHeaderContentInsetStart({
@@ -9016,18 +9039,29 @@ function measureHeaderContentWidth(ctx, contents) {
9016
9039
  ) + Math.max(contents.length - 1, 0) * gap;
9017
9040
  }
9018
9041
  function drawHeaderActions(params, rect, columnKey, visibilityState, fixed, visibleRect = rect, hasEdit = false, selected = false) {
9019
- if (!visibilityState.visible) {
9020
- return;
9021
- }
9022
9042
  const { ctx, descriptors } = params;
9023
9043
  ctx.save();
9024
9044
  ctx.beginPath();
9025
9045
  ctx.rect(visibleRect.x, visibleRect.y, visibleRect.width, visibleRect.height);
9026
9046
  ctx.clip();
9047
+ if (hasEdit) {
9048
+ const hitRect = intersectRects(drawHeaderEditMarker(ctx, rect), visibleRect);
9049
+ if (hitRect) descriptors.push({
9050
+ kind: "header",
9051
+ rect: hitRect,
9052
+ columnKey,
9053
+ fixed,
9054
+ debugNodeType: "header-edit-icon",
9055
+ debugText: "\u5F53\u524D\u5217\u53EF\u7F16\u8F91"
9056
+ });
9057
+ }
9058
+ if (!visibilityState.visible) {
9059
+ ctx.restore();
9060
+ return;
9061
+ }
9027
9062
  const actionLayout = getHeaderActionLayout({
9028
9063
  rect,
9029
9064
  hasFilter: params.filterableColumnKeys.has(columnKey),
9030
- hasEdit,
9031
9065
  visibilityState,
9032
9066
  trailingInset: resolveCollapsedColumnMarkerSet(
9033
9067
  params.collapsedColumnMarkers,
@@ -9058,28 +9092,7 @@ function drawHeaderActions(params, rect, columnKey, visibilityState, fixed, visi
9058
9092
  width: ACTION_SIZE2,
9059
9093
  height: ACTION_SIZE2
9060
9094
  };
9061
- if (actionType === "edit") {
9062
- drawHeaderActionIcon(
9063
- ctx,
9064
- actionRect,
9065
- "edit",
9066
- true,
9067
- false,
9068
- headerSelected,
9069
- params.theme.selectionBackgroundColor
9070
- );
9071
- const hitRect2 = intersectRects(actionRect, visibleRect);
9072
- if (hitRect2)
9073
- descriptors.push({
9074
- kind: "header",
9075
- rect: hitRect2,
9076
- columnKey,
9077
- fixed,
9078
- debugNodeType: "header-edit-icon",
9079
- debugText: "\u5F53\u524D\u5217\u53EF\u7F16\u8F91"
9080
- });
9081
- return;
9082
- }
9095
+ if (actionType === "edit") return;
9083
9096
  const iconHovered = params.hoveredColumnKey === columnKey && params.hoveredActionType === (actionType === "sort" ? "sort-trigger" : actionType === "filter" ? "filter-trigger" : "fixed-trigger");
9084
9097
  drawHeaderActionIcon(
9085
9098
  ctx,
@@ -9232,7 +9245,7 @@ function getHeaderSelectionRect(rect) {
9232
9245
  height: size
9233
9246
  };
9234
9247
  }
9235
- function getHeaderActionVisibilityState(columnKey, hoveredColumnKey, sortedColumnKey, filteredColumnKeys, filterableColumnKeys, fixedColumnKeys, editable) {
9248
+ function getHeaderActionVisibilityState(columnKey, hoveredColumnKey, sortedColumnKey, filteredColumnKeys, filterableColumnKeys, fixedColumnKeys) {
9236
9249
  const hovered = hoveredColumnKey === columnKey;
9237
9250
  const sorted = sortedColumnKey === columnKey;
9238
9251
  const filtered = filterableColumnKeys.has(columnKey) && filteredColumnKeys.has(columnKey);
@@ -9242,7 +9255,7 @@ function getHeaderActionVisibilityState(columnKey, hoveredColumnKey, sortedColum
9242
9255
  sorted,
9243
9256
  filtered,
9244
9257
  fixed,
9245
- visible: hovered || sorted || filtered || fixed || editable
9258
+ visible: hovered || sorted || filtered || fixed
9246
9259
  };
9247
9260
  }
9248
9261
  function getActionActive(actionType, visibilityState) {
@@ -10329,8 +10342,7 @@ function drawBodyNestedTableContent(params) {
10329
10342
  align: column.align ?? "left",
10330
10343
  actionVisibilityState,
10331
10344
  allowActions: true,
10332
- hasFilter: column.allowFilter === true,
10333
- hasEdit: !!column.editable && column.showEditIcon === true
10345
+ hasFilter: column.allowFilter === true
10334
10346
  });
10335
10347
  const headerHighlighted = isNestedTableHeaderHighlighted(
10336
10348
  content,
@@ -10707,11 +10719,27 @@ function drawNestedTableHeaderActions(params) {
10707
10719
  const filtered = highlight?.filterState?.[columnKey] != null;
10708
10720
  const fixed = resolveNestedColumnFixed(column, highlight);
10709
10721
  const headerSelected = highlight?.kind === "header" && isNestedTableRuntimeColumnMatched(highlight, column, columnIndex);
10722
+ if (column.editable && column.showEditIcon !== false) {
10723
+ const markerRect = drawHeaderEditMarker(drawParams.ctx, rect);
10724
+ drawParams.descriptors.push({
10725
+ kind: "body-content",
10726
+ rect: markerRect,
10727
+ columnKey: drawParams.column.key,
10728
+ rowIndex: drawParams.rowIndex,
10729
+ contentIndex: drawParams.contentIndex,
10730
+ contentKey: "nested-table",
10731
+ nestedColumnDataIndex: columnKey,
10732
+ nestedColumnIndex: columnIndex,
10733
+ fixed: drawParams.column.fixed,
10734
+ frozen: drawParams.frozen,
10735
+ debugNodeType: "nested-table-header-edit-icon",
10736
+ debugText: "\u5F53\u524D\u5217\u53EF\u7F16\u8F91"
10737
+ });
10738
+ }
10710
10739
  if (!visibilityState.visible) return;
10711
10740
  const { actionTypes, startX, totalWidth } = getHeaderActionLayout({
10712
10741
  rect,
10713
10742
  hasFilter: column.allowFilter === true,
10714
- hasEdit: !!column.editable && column.showEditIcon === true,
10715
10743
  visibilityState
10716
10744
  });
10717
10745
  drawParams.ctx.save();
@@ -10733,33 +10761,7 @@ function drawNestedTableHeaderActions(params) {
10733
10761
  width: size,
10734
10762
  height: size
10735
10763
  };
10736
- if (actionType === "edit") {
10737
- drawHeaderActionIcon(
10738
- drawParams.ctx,
10739
- actionRect,
10740
- "edit",
10741
- true,
10742
- false,
10743
- headerSelected,
10744
- drawParams.theme.selectionBackgroundColor
10745
- );
10746
- drawParams.descriptors.push({
10747
- kind: "body-content",
10748
- rect: actionRect,
10749
- columnKey: drawParams.column.key,
10750
- rowIndex: drawParams.rowIndex,
10751
- contentIndex: drawParams.contentIndex,
10752
- contentKey: "nested-table",
10753
- nestedColumnDataIndex: columnKey,
10754
- nestedColumnIndex: columnIndex,
10755
- fixed: drawParams.column.fixed,
10756
- frozen: drawParams.frozen,
10757
- debugNodeType: "nested-table-header-edit-icon",
10758
- debugText: "\u5F53\u524D\u5217\u53EF\u7F16\u8F91"
10759
- });
10760
- actionX += size + gap;
10761
- return;
10762
- }
10764
+ if (actionType === "edit") return;
10763
10765
  const active = actionType === "sort" && sortOrder != null || actionType === "filter" && filtered || actionType === "fixed" && fixed != null;
10764
10766
  drawHeaderActionIcon(
10765
10767
  drawParams.ctx,
@@ -10803,7 +10805,7 @@ function resolveNestedTableHeaderActionVisibility(params) {
10803
10805
  sorted,
10804
10806
  filtered,
10805
10807
  fixed,
10806
- visible: hovered || sorted || filtered || fixed || !!column.editable && column.showEditIcon === true
10808
+ visible: hovered || sorted || filtered || fixed
10807
10809
  };
10808
10810
  }
10809
10811
  function isNestedTableRowHighlighted(content, record, rowIndex, highlight, highlightMode) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canvas-components/list-table",
3
- "version": "0.3.35",
3
+ "version": "0.3.36",
4
4
  "description": "Framework-agnostic list table core engine.",
5
5
  "license": "MIT",
6
6
  "type": "module",