es-grid-template 1.7.29 → 1.7.30

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.
@@ -123,7 +123,9 @@ const TableBodyCellEdit = props => {
123
123
  handleDeleteContent,
124
124
  reset,
125
125
  setValue,
126
- handleAddMulti,
126
+ getValues,
127
+ handleCellChange,
128
+ // handleAddMulti,
127
129
  dataErrors,
128
130
  expanded,
129
131
  setExpanded,
@@ -149,12 +151,16 @@ const TableBodyCellEdit = props => {
149
151
  const isPinned = cell.column.getIsPinned();
150
152
  const isLastLeftPinnedColumn = isPinned === "left" && cell.column.getIsLastColumn("left");
151
153
  const isFirstRightPinnedColumn = isPinned === "right" && cell.column.getIsFirstColumn("right");
154
+ const selectRowIds = React.useMemo(() => {
155
+ return startCell && endCell ? getRowIdsBetween(table, startCell.rowId, endCell.rowId) : [];
156
+ }, [endCell, startCell, table]);
152
157
  const isCellSelected = React.useMemo(() => {
153
158
  if (!startCell || !endCell) return false;
154
- const rowIds = getRowIdsBetween(table, startCell.rowId, endCell.rowId);
159
+
160
+ // const rowIds = getRowIdsBetween(table, startCell.rowId, endCell.rowId);
155
161
  const colIds = getColIdsBetween(table, startCell.colId, endCell.colId);
156
- return rowIds.includes(cell.row.id) && colIds.includes(cell.column.id);
157
- }, [cell.column.id, cell.row.id, endCell, startCell, table]);
162
+ return selectRowIds.includes(cell.row.id) && colIds.includes(cell.column.id);
163
+ }, [cell.column.id, cell.row.id, endCell, selectRowIds, startCell, table]);
158
164
  const editType = typeof columnMeta.editType === 'function' ? columnMeta.editType(record) : columnMeta.editType;
159
165
  const {
160
166
  rowRange,
@@ -185,136 +191,6 @@ const TableBodyCellEdit = props => {
185
191
  const isLeftPaste = colIdxPaste === pasteRangeState.startColIndex;
186
192
  const isRightPaste = colIdxPaste === pasteRangeState.endColIndex;
187
193
  const parrents = cell.row.getParentRows();
188
- if (cell.column.id === "#") {
189
- return /*#__PURE__*/React.createElement("td", {
190
- key: cell.id,
191
- className: classNames(`${prefix}-grid-cell`, {
192
- [`${prefix}-grid-cell-ellipsis`]: true,
193
- [`${prefix}-grid-cell-fix-left-last`]: isLastLeftPinnedColumn,
194
- [`${prefix}-grid-cell-fix-right-first`]: isFirstRightPinnedColumn,
195
- [`${prefix}-grid-cell-text-center`]: columnMeta?.headerTextAlign === 'center',
196
- [`${prefix}-grid-cell-text-right`]: columnMeta?.headerTextAlign === 'right'
197
- }),
198
- style: {
199
- display: 'flex',
200
- height: '36px',
201
- width: cell.column.getSize(),
202
- ...getCommonPinningStyles(cell.column)
203
- }
204
- }, cell.column.getIndex() === expandIconColumnIndex && /*#__PURE__*/React.createElement("div", {
205
- className: "ui-rc-table-row-expand-trigger",
206
- style: {
207
- paddingLeft: `${cell.row.depth * 25}px`
208
- }
209
- }, /*#__PURE__*/React.createElement("div", null, cell.row.getCanExpand() ? /*#__PURE__*/React.createElement("button", {
210
- // onClick: row.getToggleExpandedHandler(),
211
- onClick: () => {
212
- const keys = Object.keys(expanded);
213
- // @ts-ignore
214
- const tmp = {
215
- ...expanded
216
- };
217
- if (keys.includes(cell.row.id)) {
218
- delete tmp[cell.row.id];
219
- setExpanded(tmp);
220
- } else {
221
- setExpanded(old => ({
222
- ...old,
223
- [cell.row.id]: true
224
- }));
225
- }
226
- },
227
- style: {
228
- cursor: "pointer"
229
- },
230
- className: "ui-rc-table-row-expand"
231
- }, cell.row.getIsExpanded() ? /*#__PURE__*/React.createElement("span", {
232
- className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-expanded"
233
- }) : /*#__PURE__*/React.createElement("span", {
234
- className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-collapsed"
235
- })) : /*#__PURE__*/React.createElement("span", {
236
- className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-spaced"
237
- }))), renderCellIndex({
238
- parrents,
239
- cell
240
- }));
241
- }
242
- if (cell.column.id === "command") {
243
- return /*#__PURE__*/React.createElement("td", {
244
- key: cell.id,
245
- className: classNames(`${prefix}-grid-cell`, {
246
- [`${prefix}-grid-cell-ellipsis`]: true,
247
- [`${prefix}-grid-cell-fix-left-last`]: isLastLeftPinnedColumn,
248
- [`${prefix}-grid-cell-fix-right-first`]: isFirstRightPinnedColumn,
249
- [`${prefix}-grid-cell-text-center`]: columnMeta?.headerTextAlign === 'center',
250
- [`${prefix}-grid-cell-text-right`]: columnMeta?.headerTextAlign === 'right'
251
- }),
252
- style: {
253
- display: 'flex',
254
- height: '36px',
255
- width: cell.column.getSize(),
256
- ...getCommonPinningStyles(cell.column)
257
- }
258
- }, renderCommand({
259
- cell,
260
- commandClick,
261
- id,
262
- data: originData
263
- }));
264
- }
265
- if (cell.column.id === "selection_column") {
266
- return /*#__PURE__*/React.createElement("td", {
267
- key: cell.id,
268
- className: classNames(`${prefix}-grid-cell cell-editable111 `, {
269
- [`${prefix}-grid-cell-ellipsis`]: true,
270
- [`${prefix}-grid-cell-fix-left-last`]: isLastLeftPinnedColumn,
271
- [`${prefix}-grid-cell-fix-right-first`]: isFirstRightPinnedColumn,
272
- [`${prefix}-grid-cell-text-center`]: columnMeta?.headerTextAlign === 'center',
273
- [`${prefix}-grid-cell-text-right`]: columnMeta?.headerTextAlign === 'right'
274
- }),
275
- style: {
276
- display: 'flex',
277
- height: '36px',
278
- width: cell.column.getSize(),
279
- ...getCommonPinningStyles(cell.column)
280
- }
281
- }, cell.column.getIndex() === expandIconColumnIndex && /*#__PURE__*/React.createElement("div", {
282
- className: "ui-rc-table-row-expand-trigger",
283
- style: {
284
- paddingLeft: `${cell.row.depth * 25}px`
285
- }
286
- }, /*#__PURE__*/React.createElement("div", null, cell.row.getCanExpand() ? /*#__PURE__*/React.createElement("button", {
287
- // onClick: row.getToggleExpandedHandler(),
288
- onClick: () => {
289
- const keys = Object.keys(expanded);
290
- // @ts-ignore
291
- const tmp = {
292
- ...expanded
293
- };
294
- if (keys.includes(cell.row.id)) {
295
- delete tmp[cell.row.id];
296
- setExpanded(tmp);
297
- } else {
298
- setExpanded(old => ({
299
- ...old,
300
- [cell.row.id]: true
301
- }));
302
- }
303
- },
304
- style: {
305
- cursor: "pointer"
306
- },
307
- className: "ui-rc-table-row-expand"
308
- }, cell.row.getIsExpanded() ? /*#__PURE__*/React.createElement("span", {
309
- className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-expanded"
310
- }) : /*#__PURE__*/React.createElement("span", {
311
- className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-collapsed"
312
- })) : /*#__PURE__*/React.createElement("span", {
313
- className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-spaced"
314
- }))), renderSelection({
315
- cell
316
- }));
317
- }
318
194
  const triggerDragPaste = (pasteState, ctrlKey) => {
319
195
  const tmpCols = table.getVisibleLeafColumns();
320
196
  const rowPasteIds = getRowIdsBetween(table, startPasteCell?.rowId ?? '', endPasteCell?.rowId ?? '');
@@ -446,32 +322,6 @@ const TableBodyCellEdit = props => {
446
322
  const rs = unFlattenData(rsFilterData);
447
323
  triggerPaste?.(pastedRows, colPasteds, rs, copyRows);
448
324
  };
449
- function handleMouseDown(rowId, colId) {
450
- setIsSelecting?.(true);
451
- if (startCell?.rowId !== rowId || startCell?.colId !== colId || endCell?.rowId !== rowId || endCell?.colId !== colId) {
452
- setStartCell?.({
453
- rowId,
454
- colId
455
- });
456
- setEndCell?.({
457
- rowId,
458
- colId
459
- });
460
- setRangeState?.(getSelectedCellMatrix(table, {
461
- rowId,
462
- colId
463
- }, {
464
- rowId,
465
- colId
466
- }));
467
- }
468
- if (focusedCell?.rowId !== cell.row.id || focusedCell?.colId !== cell.column.id) {
469
- setFocusedCell?.({
470
- rowId: cell.row.id,
471
- colId: cell.column.id
472
- });
473
- }
474
- }
475
325
  function handleMouseEnter(rowId, colId) {
476
326
  if (isSelecting) {
477
327
  setEndCell?.({
@@ -670,6 +520,7 @@ const TableBodyCellEdit = props => {
670
520
  });
671
521
  }
672
522
  }
523
+ return;
673
524
  }
674
525
  if (e.key === 'ArrowRight') {
675
526
  e.preventDefault();
@@ -701,6 +552,7 @@ const TableBodyCellEdit = props => {
701
552
  align: 'center'
702
553
  });
703
554
  }
555
+ return;
704
556
  }
705
557
  if (e.key === 'ArrowLeft') {
706
558
  e.preventDefault();
@@ -733,14 +585,246 @@ const TableBodyCellEdit = props => {
733
585
  align: 'center'
734
586
  });
735
587
  }
588
+ return;
736
589
  }
737
590
  if (e.key === 'Delete') {
738
591
  handleDeleteContent?.();
592
+ return;
739
593
  }
740
594
  if (e.key === 'Enter') {
741
595
  handleEdit(e);
596
+ return;
597
+ }
598
+ if (e.key.length === 1) {
599
+ e.preventDefault();
600
+ e.stopPropagation();
601
+ handleEdit(e);
602
+ // setValue(cell.column.id, editType === 'numeric' ? (!isNaN(Number(e.key)) ? Number(e.key) : '') : e.key)
603
+ }
604
+ }
605
+ function handleMouseDown(rowId, colId) {
606
+ setIsSelecting?.(true);
607
+ if (startCell?.rowId !== rowId || startCell?.colId !== colId || endCell?.rowId !== rowId || endCell?.colId !== colId) {
608
+ setStartCell?.({
609
+ rowId,
610
+ colId
611
+ });
612
+ setEndCell?.({
613
+ rowId,
614
+ colId
615
+ });
616
+ setRangeState?.(getSelectedCellMatrix(table, {
617
+ rowId,
618
+ colId
619
+ }, {
620
+ rowId,
621
+ colId
622
+ }));
623
+ }
624
+ if (focusedCell?.rowId !== cell.row.id || focusedCell?.colId !== cell.column.id) {
625
+ setFocusedCell?.({
626
+ rowId: cell.row.id,
627
+ colId: cell.column.id
628
+ });
742
629
  }
743
630
  }
631
+ const handleMouseDownIndex = rowId => {
632
+ const allColumns = table.getVisibleLeafColumns();
633
+ const startCol = allColumns[0].id;
634
+ const endCol = allColumns[allColumns.length - 1].id;
635
+ setStartCell?.({
636
+ rowId,
637
+ colId: startCol
638
+ });
639
+ setEndCell?.({
640
+ rowId,
641
+ colId: endCol
642
+ });
643
+ setRangeState?.(getSelectedCellMatrix(table, {
644
+ rowId,
645
+ colId: startCol
646
+ }, {
647
+ rowId,
648
+ colId: endCol
649
+ }));
650
+ };
651
+ if (cell.column.id === "#") {
652
+ return /*#__PURE__*/React.createElement("td", {
653
+ key: cell.id,
654
+ className: classNames(`${prefix}-grid-cell ${prefix}-grid-cell-index`, {
655
+ [`${prefix}-grid-cell-ellipsis`]: true,
656
+ [`${prefix}-grid-cell-fix-left-last`]: isLastLeftPinnedColumn,
657
+ [`${prefix}-grid-cell-fix-right-first`]: isFirstRightPinnedColumn,
658
+ [`${prefix}-grid-cell-text-center`]: columnMeta?.headerTextAlign === 'center',
659
+ [`${prefix}-grid-cell-text-right`]: columnMeta?.headerTextAlign === 'right',
660
+ // [`${prefix}-grid-cell-index-selected`]: rowRange?.includes(cell.row.id),
661
+ [`${prefix}-grid-cell-index-selected`]: selectRowIds?.includes(cell.row.id)
662
+ }),
663
+ style: {
664
+ display: 'flex',
665
+ height: '36px',
666
+ userSelect: 'none',
667
+ width: cell.column.getSize(),
668
+ // minWidth: cell.column.getSize(),
669
+ // maxWidth: cell.column.getSize(),
670
+ ...getCommonPinningStyles(cell.column)
671
+ },
672
+ onMouseDown: () => {
673
+ if (record[rowKey] === editingKey) {
674
+ setFocusedCell?.({
675
+ rowId: cell.row.id,
676
+ colId: cell.column.id
677
+ });
678
+ } else {
679
+ handleMouseDownIndex(cell.row.id);
680
+ if (editingKey) {
681
+ setTimeout(() => {
682
+ setEditingKey?.('');
683
+ reset?.();
684
+ });
685
+ }
686
+
687
+ // reset?.()
688
+ }
689
+ }
690
+ }, cell.column.getIndex() === expandIconColumnIndex && /*#__PURE__*/React.createElement("div", {
691
+ className: "ui-rc-table-row-expand-trigger",
692
+ style: {
693
+ paddingLeft: `${cell.row.depth * 25}px`
694
+ }
695
+ }, /*#__PURE__*/React.createElement("div", null, cell.row.getCanExpand() ? /*#__PURE__*/React.createElement("button", {
696
+ // onClick: row.getToggleExpandedHandler(),
697
+ onClick: () => {
698
+ const keys = Object.keys(expanded);
699
+ // @ts-ignore
700
+ const tmp = {
701
+ ...expanded
702
+ };
703
+ if (keys.includes(cell.row.id)) {
704
+ delete tmp[cell.row.id];
705
+ setExpanded(tmp);
706
+ } else {
707
+ setExpanded(old => ({
708
+ ...old,
709
+ [cell.row.id]: true
710
+ }));
711
+ }
712
+ },
713
+ style: {
714
+ cursor: "pointer"
715
+ },
716
+ className: "ui-rc-table-row-expand"
717
+ }, cell.row.getIsExpanded() ? /*#__PURE__*/React.createElement("span", {
718
+ className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-expanded"
719
+ }) : /*#__PURE__*/React.createElement("span", {
720
+ className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-collapsed"
721
+ })) : /*#__PURE__*/React.createElement("span", {
722
+ className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-spaced"
723
+ }))), renderCellIndex({
724
+ parrents,
725
+ cell
726
+ }));
727
+ }
728
+ if (cell.column.id === "command") {
729
+ return /*#__PURE__*/React.createElement("td", {
730
+ key: cell.id,
731
+ className: classNames(`${prefix}-grid-cell`, {
732
+ [`${prefix}-grid-cell-ellipsis`]: true,
733
+ [`${prefix}-grid-cell-fix-left-last`]: isLastLeftPinnedColumn,
734
+ [`${prefix}-grid-cell-fix-right-first`]: isFirstRightPinnedColumn,
735
+ [`${prefix}-grid-cell-text-center`]: columnMeta?.headerTextAlign === 'center',
736
+ [`${prefix}-grid-cell-text-right`]: columnMeta?.headerTextAlign === 'right'
737
+ }),
738
+ style: {
739
+ display: 'flex',
740
+ height: '36px',
741
+ width: cell.column.getSize(),
742
+ // minWidth: cell.column.getSize(),
743
+ // maxWidth: cell.column.getSize(),
744
+ ...getCommonPinningStyles(cell.column)
745
+ }
746
+ }, renderCommand({
747
+ cell,
748
+ commandClick,
749
+ id,
750
+ data: originData
751
+ }));
752
+ }
753
+ if (cell.column.id === "selection_column") {
754
+ return /*#__PURE__*/React.createElement("td", {
755
+ key: cell.id,
756
+ className: classNames(`${prefix}-grid-cell cell-editable111 `, {
757
+ [`${prefix}-grid-cell-ellipsis`]: true,
758
+ [`${prefix}-grid-cell-fix-left-last`]: isLastLeftPinnedColumn,
759
+ [`${prefix}-grid-cell-fix-right-first`]: isFirstRightPinnedColumn,
760
+ [`${prefix}-grid-cell-text-center`]: columnMeta?.headerTextAlign === 'center',
761
+ [`${prefix}-grid-cell-text-right`]: columnMeta?.headerTextAlign === 'right'
762
+ }),
763
+ style: {
764
+ display: 'flex',
765
+ height: '36px',
766
+ width: cell.column.getSize(),
767
+ // minWidth: cell.column.getSize(),
768
+ // maxWidth: cell.column.getSize(),
769
+ ...getCommonPinningStyles(cell.column)
770
+ }
771
+ }, cell.column.getIndex() === expandIconColumnIndex && /*#__PURE__*/React.createElement("div", {
772
+ className: "ui-rc-table-row-expand-trigger",
773
+ style: {
774
+ paddingLeft: `${cell.row.depth * 25}px`
775
+ }
776
+ }, /*#__PURE__*/React.createElement("div", null, cell.row.getCanExpand() ? /*#__PURE__*/React.createElement("button", {
777
+ // onClick: row.getToggleExpandedHandler(),
778
+ onClick: () => {
779
+ const keys = Object.keys(expanded);
780
+ // @ts-ignore
781
+ const tmp = {
782
+ ...expanded
783
+ };
784
+ if (keys.includes(cell.row.id)) {
785
+ delete tmp[cell.row.id];
786
+ setExpanded(tmp);
787
+ } else {
788
+ setExpanded(old => ({
789
+ ...old,
790
+ [cell.row.id]: true
791
+ }));
792
+ }
793
+ },
794
+ style: {
795
+ cursor: "pointer"
796
+ },
797
+ className: "ui-rc-table-row-expand"
798
+ }, cell.row.getIsExpanded() ? /*#__PURE__*/React.createElement("span", {
799
+ className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-expanded"
800
+ }) : /*#__PURE__*/React.createElement("span", {
801
+ className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-collapsed"
802
+ })) : /*#__PURE__*/React.createElement("span", {
803
+ className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-spaced"
804
+ }))), renderSelection({
805
+ cell
806
+ }));
807
+ }
808
+ const handleChange = () => {
809
+ const currentRowIndex = allRows.findIndex(r => r.id === editingKey);
810
+ const formState = getValues();
811
+ const itemState = getValues(cell.column.id);
812
+ const prevState = record[cell.column.id];
813
+ const newState = itemState;
814
+ if (newState !== prevState) {
815
+ handleCellChange?.({
816
+ key: cell.row.id,
817
+ field: cell.column.id,
818
+ record: formState,
819
+ prevState,
820
+ newState,
821
+ option: newState,
822
+ indexCol: cell.column.getIndex(),
823
+ indexRow: currentRowIndex,
824
+ type: 'blur'
825
+ });
826
+ }
827
+ };
744
828
  return /*#__PURE__*/React.createElement("td", {
745
829
  key: cell.id,
746
830
  ref: el => {
@@ -780,6 +864,8 @@ const TableBodyCellEdit = props => {
780
864
  style: {
781
865
  display: 'flex',
782
866
  width: cell.column.getSize(),
867
+ // minWidth: cell.column.getSize(),
868
+ // maxWidth: cell.column.getSize(),
783
869
  height: '36px',
784
870
  ...getCommonPinningStyles(cell.column),
785
871
  cursor: isPasting ? 'crosshair' : undefined
@@ -793,10 +879,14 @@ const TableBodyCellEdit = props => {
793
879
  } else {
794
880
  handleMouseDown(cell.row.id, cell.column.id);
795
881
  if (editingKey) {
796
- setTimeout(() => {
797
- setEditingKey?.('');
798
- reset?.();
799
- });
882
+ // setTimeout(() => {
883
+ // setEditingKey?.('')
884
+ // reset?.()
885
+ // })
886
+
887
+ handleChange();
888
+ setEditingKey?.('');
889
+ reset?.();
800
890
  }
801
891
 
802
892
  // reset?.()
@@ -823,8 +913,6 @@ const TableBodyCellEdit = props => {
823
913
  if (e.key === 'Enter') {
824
914
  e.preventDefault();
825
915
  e.stopPropagation();
826
- setEditingKey?.('');
827
- reset?.();
828
916
  const currentRowIndex = allRows.findIndex(r => r.id === cell.row.id);
829
917
  const nextRow = allRows[currentRowIndex + 1];
830
918
  if (nextRow) {
@@ -847,47 +935,38 @@ const TableBodyCellEdit = props => {
847
935
  rowId: nextRow.id,
848
936
  colId: cell.column.id
849
937
  }));
850
-
851
- // columnVirtualizer.scrollToIndex(nextCol.getIndex(), { align: 'center' })
852
- } else {
853
- const newRowId = newGuid();
854
- handleAddMulti?.({}, 1, newRowId);
855
- setFocusedCell?.({
856
- rowId: newRowId,
857
- colId: cell.column.id
858
- });
859
- setStartCell?.({
860
- rowId: newRowId,
861
- colId: cell.column.id
938
+ rowVirtualizer.scrollToIndex(nextRow.index, {
939
+ align: 'center'
862
940
  });
863
- setEndCell?.({
864
- rowId: newRowId,
865
- colId: cell.column.id
866
- });
867
- setTimeout(() => {
868
- setRangeState?.(getSelectedCellMatrix(table, {
869
- rowId: newRowId,
870
- colId: cell.column.id
871
- }, {
872
- rowId: newRowId,
873
- colId: cell.column.id
874
- }));
875
- // rowVirtualizer.scrollToIndex(101)
876
- }, 0);
877
- }
878
- if (editingKey && editingKey !== '' && (rowNumber ?? 0) + 1 < flattenArray(dataSource).length) {
879
-
880
- // handleFocusCell((rowNumber ?? 0) + 1, colIndex, column, 'vertical', event)
881
941
  } else {
882
- // // focus cell hiện tại và tắt edit
883
- // handleFocusCell((rowNumber ?? 0), colIndex, column, 'vertical', event)
884
- // setEditingKey('')
885
942
 
886
- // thêm dòng mới
943
+ // const newRowId = newGuid()
944
+ // handleAddMulti?.({}, 1, newRowId)
887
945
 
888
- // handleAddSingle()
889
- // handleFocusCell((rowNumber ?? 0) + 1, colIndex, column, 'vertical', event, true)
946
+ // setFocusedCell?.({ rowId: newRowId, colId: cell.column.id });
947
+
948
+ // setStartCell?.({ rowId: newRowId, colId: cell.column.id });
949
+ // setEndCell?.({ rowId: newRowId, colId: cell.column.id });
950
+
951
+ // setTimeout(() => {
952
+ // setRangeState?.(getSelectedCellMatrix(table, { rowId: newRowId, colId: cell.column.id }, { rowId: newRowId, colId: cell.column.id }))
953
+ // // rowVirtualizer.scrollToIndex(currentRowIndex + 1, { align: 'end', })
954
+
955
+ // })
956
+
957
+ // setTimeout(() => {
958
+
959
+ // rowVirtualizer.scrollToIndex(currentRowIndex + 1, { align: 'center', })
960
+
961
+ // }, 100)
890
962
  }
963
+ handleChange();
964
+ setEditingKey?.('');
965
+ reset?.();
966
+
967
+ // setTimeout(() => {
968
+
969
+ // })
891
970
  }
892
971
  }
893
972
  }
@@ -961,6 +1040,8 @@ const TableBodyCellEdit = props => {
961
1040
  onDoubleClick: handlePointDoubleClick
962
1041
  }, /*#__PURE__*/React.createElement("span", {
963
1042
  className: 'dot-point'
964
- })));
1043
+ })), !isEditing && rowError && rowError[cell.column.id]?.field === cell.column.id && /*#__PURE__*/React.createElement("span", {
1044
+ className: "isValid"
1045
+ }));
965
1046
  };
966
1047
  export default TableBodyCellEdit;
@@ -21,8 +21,6 @@ const TableFooterRow = ({
21
21
  // const a = table.getVisibleFlatColumns()
22
22
  const visibleColumns = table.getVisibleLeafColumns();
23
23
 
24
- // console.log('a', a)
25
-
26
24
  // const
27
25
 
28
26
  return /*#__PURE__*/React.createElement("tr", {
@@ -309,7 +309,7 @@ export function getFixedFields(columns, type) {
309
309
  const result = [];
310
310
  function traverse(cols) {
311
311
  for (const col of cols) {
312
- if ((col.fixed ?? col.fixedType) === type && col.field) {
312
+ if ((col.fixed ?? col.fixedType) === type && col.field && col.visible !== false) {
313
313
  result.push(col.field);
314
314
  }
315
315
  if (col.children && col.children.length > 0) {
@@ -1,5 +1,4 @@
1
1
  import InternalTable from './InternalTable';
2
- import type { ColumnsTable, TableProps, ColumnTable, CommandItem, ContextMenuItem } from './type';
3
- import type { ToolbarItem } from "rc-master-ui/es/toolbar";
4
- export type { ColumnsTable, TableProps, ColumnTable, ToolbarItem, CommandItem, ContextMenuItem };
2
+ import type { ColumnsTable, TableProps, ColumnTable, ContextMenuItem } from './type';
3
+ export type { ColumnsTable, TableProps, ColumnTable, ContextMenuItem };
5
4
  export default InternalTable;
@@ -1,2 +1,5 @@
1
1
  import InternalTable from "./InternalTable";
2
+
3
+ // import type {ToolbarItem} from "rc-master-ui/es/toolbar"
4
+
2
5
  export default InternalTable;