react-table-edit 1.5.36 → 1.5.38

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.mjs CHANGED
@@ -68714,9 +68714,24 @@ const RenderContentCol = (props) => {
68714
68714
  const element = document.getElementById(cellId);
68715
68715
  return element && element.scrollWidth > element.clientWidth;
68716
68716
  };
68717
+ const toggleSelect = () => {
68718
+ const idx = selectedRows?.findIndex((x) => x?.[fieldKey] === row?.[fieldKey]);
68719
+ if (idx > -1) {
68720
+ if (isMulti) {
68721
+ return selectedRows?.filter((_, i) => i !== idx);
68722
+ }
68723
+ return [];
68724
+ }
68725
+ if (isMulti) {
68726
+ return [...selectedRows, row];
68727
+ }
68728
+ return [row];
68729
+ };
68717
68730
  const RenderElement = () => {
68718
68731
  if (col.field === '#' || col.type === '#') {
68719
- return (jsx("div", { className: classNames$1('r-rowcell-div cursor-pointer text-center', { 'r-active-cell': isSelected }), style: {
68732
+ return (jsx("div", { className: classNames$1('r-rowcell-div cursor-pointer text-center', {
68733
+ 'r-active-cell': isSelected
68734
+ }), style: {
68720
68735
  fontWeight: row.sortOrder < 0 || row.sortOrder > 100000 || row.haveBoldType ? 600 : 400,
68721
68736
  fontStyle: row.haveItalicType ? 'italic' : 'normal'
68722
68737
  }, onDoubleClick: (e) => {
@@ -68726,25 +68741,14 @@ const RenderContentCol = (props) => {
68726
68741
  }, children: indexRow + 1 }));
68727
68742
  }
68728
68743
  else if (col.type === 'checkbox' || col.field === 'checkbox') {
68729
- return (jsx("div", { className: classNames$1('r-rowcell-div cursor-pointer', { 'r-active-cell': isSelected }), style: { display: 'flex', justifyContent: col.textAlign === 'center' ? 'center' : col.textAlign === 'right' ? 'flex-end' : 'flex-start', alignItems: 'center' }, onClick: (e) => {
68730
- const index = selectedRows?.findIndex((x) => x[fieldKey] === row[fieldKey]);
68731
- if (index > -1) {
68732
- if (isMulti) {
68733
- selectedRows?.splice(index, 1);
68734
- setSelectedRows([...selectedRows]);
68735
- }
68736
- else {
68737
- setSelectedRows([]);
68738
- }
68739
- }
68740
- else {
68741
- if (isMulti) {
68742
- setSelectedRows([...selectedRows, row]);
68743
- }
68744
- else {
68745
- setSelectedRows([row]);
68746
- }
68747
- }
68744
+ return (jsx("div", { className: classNames$1('r-rowcell-div cursor-pointer', {
68745
+ 'r-active-cell': isSelected
68746
+ }), style: {
68747
+ display: 'flex',
68748
+ justifyContent: col.textAlign === 'center' ? 'center' : col.textAlign === 'right' ? 'flex-end' : 'flex-start',
68749
+ alignItems: 'center'
68750
+ }, onClick: (e) => {
68751
+ setSelectedRows(toggleSelect());
68748
68752
  e.stopPropagation();
68749
68753
  }, children: jsx(Input$1, { defaultChecked: isSelected, type: "checkbox", className: "cursor-pointer", style: { textAlign: col.textAlign ?? 'center' } }) }));
68750
68754
  }
@@ -68771,13 +68775,11 @@ const RenderContentCol = (props) => {
68771
68775
  const prefix = isNegative ? formatSetting?.prefixNegative ?? '-' : '';
68772
68776
  const suffix = isNegative ? formatSetting?.suffixNegative ?? '' : '';
68773
68777
  const displayText = isNegative ? `${prefix}${value}${suffix}` : value ?? '';
68774
- return (jsxs("div", { className: classNames$1('r-rowcell-div cursor-pointer', { 'r-active-cell': isSelected }), style: {
68778
+ return (jsxs("div", { className: classNames$1('r-rowcell-div cursor-pointer', {
68779
+ 'r-active-cell': isSelected
68780
+ }), style: {
68775
68781
  fontWeight: row.sortOrder < 0 || row.sortOrder > 100000 || row.haveBoldType ? 600 : 400,
68776
68782
  fontStyle: row.haveItalicType ? 'italic' : 'normal'
68777
- }, onDoubleClick: (e) => {
68778
- e.preventDefault();
68779
- handleCloseContext();
68780
- handleDoubleClick?.(row, col);
68781
68783
  }, children: [jsx("div", { className: "r-cell-text", style: {
68782
68784
  display: 'flex',
68783
68785
  justifyContent: col.textAlign === 'center' ? 'center' : col.textAlign === 'right' ? 'flex-end' : 'flex-start',
@@ -68794,31 +68796,40 @@ const RenderContentCol = (props) => {
68794
68796
  }, children: displayText }) }))] }));
68795
68797
  }
68796
68798
  };
68797
- return (jsx(Fragment$1, { children: col.visible !== false && col.isGroup !== true && (jsx("td", { className: classNames$1(`r-rowcell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'r-active': isSelected }), style: {
68799
+ const clickTimerRef = useRef(null);
68800
+ return (jsx(Fragment$1, { children: col.visible !== false && col.isGroup !== true && (jsx("td", { className: classNames$1(`r-rowcell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, {
68801
+ 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight)
68802
+ }, { 'r-active': isSelected }), style: {
68798
68803
  left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
68799
68804
  right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined
68800
68805
  }, onClick: (e) => {
68801
- if (e.target.nodeName === 'DIV' || e.target.nodeName === 'TD') {
68802
- const index = selectedRows?.findIndex((x) => x[fieldKey] === row[fieldKey]);
68803
- if (index > -1) {
68804
- if (isMulti) {
68805
- selectedRows?.splice(index, 1);
68806
- setSelectedRows([...selectedRows]);
68807
- }
68808
- else {
68809
- setSelectedRows([]);
68810
- }
68811
- }
68812
- else {
68813
- if (isMulti) {
68814
- setSelectedRows([...selectedRows, row]);
68815
- }
68816
- else {
68817
- setSelectedRows([row]);
68818
- }
68819
- }
68820
- e.stopPropagation();
68806
+ const tag = e.target?.nodeName;
68807
+ if (tag !== 'DIV' && tag !== 'TD') {
68808
+ return;
68821
68809
  }
68810
+ if (clickTimerRef.current) {
68811
+ window.clearTimeout(clickTimerRef.current);
68812
+ }
68813
+ if (handleDoubleClick) {
68814
+ clickTimerRef.current = window.setTimeout(() => {
68815
+ setSelectedRows(toggleSelect());
68816
+ clickTimerRef.current = null;
68817
+ }, 200);
68818
+ }
68819
+ else {
68820
+ setSelectedRows(toggleSelect());
68821
+ clickTimerRef.current = null;
68822
+ }
68823
+ }, onDoubleClick: (e) => {
68824
+ // hủy single click pending để không đổi style trước
68825
+ if (clickTimerRef.current) {
68826
+ window.clearTimeout(clickTimerRef.current);
68827
+ }
68828
+ clickTimerRef.current = null;
68829
+ handleCloseContext();
68830
+ handleDoubleClick?.(row, col);
68831
+ e.preventDefault();
68832
+ e.stopPropagation();
68822
68833
  }, children: RenderElement() }, `col-${indexRow}-${indexCol}`)) }));
68823
68834
  };
68824
68835
 
@@ -68953,7 +68964,11 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
68953
68964
  return (jsx("div", { className: "me-50 r-search", children: jsx(ReactInput, { style: { width: '230px' }, value: searchSetting?.searchTerm !== undefined ? searchSetting?.searchTerm : searchTerm, setSearchTerm: searchSetting?.setSearchTerm ? searchSetting?.setSearchTerm : setSearchTerm, placeholder: t('Search'), onKeyPress: handleKeyPress }) }));
68954
68965
  };
68955
68966
  const groupbtnTemplate = () => {
68956
- return (jsxs(UncontrolledDropdown, { children: [jsx(DropdownToggle$1, { tag: "div", id: "group-dropdown-toggle", style: { position: 'relative' }, onClick: (e) => e.preventDefault(), children: jsx(GroupIcon, { color: "#7F7F7F", size: 24 }) }), jsxs(DropdownMenu$1, { className: "formula-dropdown icon-dropdown p-1", children: [jsx("div", { className: "mb-1", style: { fontSize: 16, fontWeight: 500 }, children: "Nh\u00F3m d\u1EEF li\u1EC7u theo c\u1ED9t" }), jsxs("div", { className: 'form-group', children: [jsx(Label$1, { id: `label-group-1`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 1" }), jsx("div", { className: "form-input", children: jsx(SelectTable, { options: contentColumns, fieldLabel: 'headerText', fieldValue: 'field', value: groupColumns[0] ? { headerText: t(contentColumns.find((x) => x.field === groupColumns[0])?.headerText ?? contentColumns.find((x) => x.field === groupColumns[0])?.headerText) } : undefined, onChange: (val) => {
68967
+ return (jsxs(UncontrolledDropdown, { children: [jsx(DropdownToggle$1, { tag: "div", id: "group-dropdown-toggle", style: { position: 'relative' }, onClick: (e) => e.preventDefault(), children: jsx(GroupIcon, { color: "#7F7F7F", size: 24 }) }), jsxs(DropdownMenu$1, { className: "formula-dropdown icon-dropdown p-1", children: [jsx("div", { className: "mb-1", style: { fontSize: 16, fontWeight: 500 }, children: "Nh\u00F3m d\u1EEF li\u1EC7u theo c\u1ED9t" }), jsxs("div", { className: 'form-group', children: [jsx(Label$1, { id: `label-group-1`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 1" }), jsx("div", { className: "form-input", children: jsx(SelectTable, { options: contentColumns, fieldLabel: 'headerText', fieldValue: 'field', value: groupColumns[0]
68968
+ ? {
68969
+ headerText: t(contentColumns.find((x) => x.field === groupColumns[0])?.headerText ?? contentColumns.find((x) => x.field === groupColumns[0])?.headerText)
68970
+ }
68971
+ : undefined, onChange: (val) => {
68957
68972
  if (val) {
68958
68973
  groupColumns[0] = val.field;
68959
68974
  }
@@ -68961,7 +68976,11 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
68961
68976
  groupColumns.pop();
68962
68977
  }
68963
68978
  setGroupColumns([...groupColumns]);
68964
- }, isClearable: groupColumns?.length === 1 }) })] }), jsxs("div", { className: 'form-group', children: [jsx(Label$1, { id: `label-group-2`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 2" }), jsx("div", { className: "form-input", children: jsx(SelectTable, { options: contentColumns, fieldLabel: 'headerText', fieldValue: 'field', value: groupColumns[1] ? { headerText: t(contentColumns.find((x) => x.field === groupColumns[1])?.headerText ?? contentColumns.find((x) => x.field === groupColumns[1])?.headerText) } : undefined, onChange: (val) => {
68979
+ }, isClearable: groupColumns?.length === 1 }) })] }), jsxs("div", { className: 'form-group', children: [jsx(Label$1, { id: `label-group-2`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 2" }), jsx("div", { className: "form-input", children: jsx(SelectTable, { options: contentColumns, fieldLabel: 'headerText', fieldValue: 'field', value: groupColumns[1]
68980
+ ? {
68981
+ headerText: t(contentColumns.find((x) => x.field === groupColumns[1])?.headerText ?? contentColumns.find((x) => x.field === groupColumns[1])?.headerText)
68982
+ }
68983
+ : undefined, onChange: (val) => {
68965
68984
  if (val) {
68966
68985
  groupColumns[1] = val.field;
68967
68986
  }
@@ -68969,7 +68988,11 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
68969
68988
  groupColumns.pop();
68970
68989
  }
68971
68990
  setGroupColumns([...groupColumns]);
68972
- }, isClearable: groupColumns?.length === 2 }) })] }), jsxs("div", { className: 'form-group', children: [jsx(Label$1, { id: `label-group-3`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 3" }), jsx("div", { className: "form-input", children: jsx(SelectTable, { options: contentColumns, fieldLabel: 'headerText', fieldValue: 'field', value: groupColumns[2] ? { headerText: t(contentColumns.find((x) => x.field === groupColumns[2])?.headerText ?? contentColumns.find((x) => x.field === groupColumns[2])?.headerText) } : undefined, onChange: (val) => {
68991
+ }, isClearable: groupColumns?.length === 2 }) })] }), jsxs("div", { className: 'form-group', children: [jsx(Label$1, { id: `label-group-3`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 3" }), jsx("div", { className: "form-input", children: jsx(SelectTable, { options: contentColumns, fieldLabel: 'headerText', fieldValue: 'field', value: groupColumns[2]
68992
+ ? {
68993
+ headerText: t(contentColumns.find((x) => x.field === groupColumns[2])?.headerText ?? contentColumns.find((x) => x.field === groupColumns[2])?.headerText)
68994
+ }
68995
+ : undefined, onChange: (val) => {
68973
68996
  if (groupSetting) {
68974
68997
  if (val) {
68975
68998
  groupColumns[2] = val.field;
@@ -68980,7 +69003,9 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
68980
69003
  setGroupColumns([...groupColumns]);
68981
69004
  }
68982
69005
  }, isClearable: groupColumns?.length === 3 }) })] }), jsxs("div", { className: "border-top d-flex justify-content-end mt-1", children: [jsx(Button$1$1, { color: "primary", className: "mt-1 me-50 rounded", size: "sm", onClick: () => {
68983
- groupSetting?.onGroup({ columnGrouped: groupColumns.filter((x) => x) });
69006
+ groupSetting?.onGroup({
69007
+ columnGrouped: groupColumns.filter((x) => x)
69008
+ });
68984
69009
  document.getElementById('group-dropdown-toggle')?.click();
68985
69010
  }, children: `${t('Apply')}` }), jsx(Button$1$1, { color: "secondary", outline: true, className: "mt-1 rounded", size: "sm", onClick: () => {
68986
69011
  groupSetting?.onGroup({ columnGrouped: [] });
@@ -69033,8 +69058,6 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
69033
69058
  }
69034
69059
  };
69035
69060
  useEffect(() => {
69036
- console.log(selectedRows);
69037
- console.log(isMulti);
69038
69061
  if (setSelectedItem) {
69039
69062
  if (isMulti) {
69040
69063
  if (dataSource && selectedRows && selectedRows?.length !== selectedItem?.length) {
@@ -69103,7 +69126,10 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
69103
69126
  if (col.template) {
69104
69127
  value = col.template(row, indexRow) ?? '';
69105
69128
  }
69106
- return (jsxs(Fragment$1, { children: [jsxs("tr", { "aria-rowindex": indexRow + 1, role: "row", className: "r-row", children: [jsx("td", { className: "r-rowcell r-cell-group", colSpan: 3, children: jsxs("div", { className: "r-rowcell-div", children: [jsx(SvgChevronRight, { style: { marginLeft: level * 20, transform: expand ? 'rotate(90deg)' : 'rotate(0deg)' }, fontSize: 15, onClick: () => {
69129
+ return (jsxs(Fragment$1, { children: [jsxs("tr", { "aria-rowindex": indexRow + 1, role: "row", className: "r-row", children: [jsx("td", { className: "r-rowcell r-cell-group", colSpan: 3, children: jsxs("div", { className: "r-rowcell-div", children: [jsx(SvgChevronRight, { style: {
69130
+ marginLeft: level * 20,
69131
+ transform: expand ? 'rotate(90deg)' : 'rotate(0deg)'
69132
+ }, fontSize: 15, onClick: () => {
69107
69133
  setExpand(!expand);
69108
69134
  setExpandsAll(undefined);
69109
69135
  row.expand = !expand;
@@ -69124,12 +69150,18 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
69124
69150
  sumValue = '';
69125
69151
  }
69126
69152
  }
69127
- return (jsx("td", { className: "r-rowcell r-cell-sum-group", children: jsx("div", { className: "r-rowcell-div", style: { justifyContent: colSum.textAlign ? colSum.textAlign : 'left' }, children: (haveSum || colSum.haveSum === true) && Number(row[colSum.field] ?? '0') < 0 ? jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${sumValue}${formatSetting?.suffixNegative ?? ''}`] }) : sumValue }) }, `group-sum-cell-${level}-${indexRow}-${indexCol}`));
69153
+ return (jsx("td", { className: "r-rowcell r-cell-sum-group", children: jsx("div", { className: "r-rowcell-div", style: {
69154
+ justifyContent: colSum.textAlign ? colSum.textAlign : 'left'
69155
+ }, children: (haveSum || colSum.haveSum === true) && Number(row[colSum.field] ?? '0') < 0 ? (jsxs("div", { style: {
69156
+ color: formatSetting?.colorNegative ?? 'red'
69157
+ }, children: [' ', `${formatSetting?.prefixNegative ?? '-'}${sumValue}${formatSetting?.suffixNegative ?? ''}`] })) : (sumValue) }) }, `group-sum-cell-${level}-${indexRow}-${indexCol}`));
69128
69158
  })] }), expand && jsx(RenderContent, { datas: row.children, level: level + 1 })] }, `row-${level}-${indexRow}`));
69129
69159
  }
69130
69160
  else {
69131
69161
  const isSelected = selectedRows?.some((x) => x[fieldKey] === row[fieldKey]);
69132
- return (jsx("tr", { id: `row-content-${indexRow}`, "aria-rowindex": indexRow + 1, role: "row", className: classNames$1('r-row', { 'r-last-row': level === 0 && indexRow === viewData.length - 1 }), onContextMenu: (e) => {
69162
+ return (jsx("tr", { id: `row-content-${indexRow}`, "aria-rowindex": indexRow + 1, role: "row", className: classNames$1('r-row', {
69163
+ 'r-last-row': level === 0 && indexRow === viewData.length - 1
69164
+ }), onContextMenu: (e) => {
69133
69165
  e.preventDefault();
69134
69166
  handleContextMenu(e, row);
69135
69167
  }, children: contentColumns.map((column, indexCol) => (jsx(RenderContentCol, { idTable: idTable, col: column, fieldKey: fieldKey, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, isMulti: isMulti, selectedRows: selectedRows, setSelectedRows: setSelectedRows, formatSetting: formatSetting, indexCol: indexCol, indexRow: indexRow, isSelected: isSelected, row: row, zeroVisiable: zeroVisiable, handleCloseContext: handleCloseContext, handleDoubleClick: handleDoubleClick }, indexCol))) }, `row-content-${indexRow}`));
@@ -69159,7 +69191,10 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
69159
69191
  virtualDivRef.current.style.height = '0px';
69160
69192
  }
69161
69193
  }, [context]);
69162
- return (jsxs("div", { className: "r-table-edit r-virtualized-table", children: [jsxs("div", { className: "r-grid", children: [toolbarSetting?.showTopToolbar && jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption }), headerComponent && headerComponent(), jsxs("div", { ref: gridRef, className: "r-gridtable", style: { height: `${height ? `${height}px` : 'auto'}`, position: 'relative' }, children: [jsxs("table", { role: "presentation", style: { width: '100%' }, children: [jsx(RenderColGroup, { contentColumns: contentColumns }), jsx("thead", { className: "r-gridheader", role: "rowgroup", children: headerColumns.map((rowColumn, indexParent) => {
69194
+ return (jsxs("div", { className: "r-table-edit r-virtualized-table", children: [jsxs("div", { className: "r-grid", children: [toolbarSetting?.showTopToolbar && jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption }), headerComponent && headerComponent(), jsxs("div", { ref: gridRef, className: "r-gridtable", style: {
69195
+ height: `${height ? `${height}px` : 'auto'}`,
69196
+ position: 'relative'
69197
+ }, children: [jsxs("table", { role: "presentation", style: { width: '100%' }, children: [jsx(RenderColGroup, { contentColumns: contentColumns }), jsx("thead", { className: "r-gridheader", role: "rowgroup", children: headerColumns.map((rowColumn, indexParent) => {
69163
69198
  return (jsx("tr", { className: "r-row", role: "row", children: rowColumn.map((col, index) => (jsx(HeaderTableCol, { col: col, idTable: idTable ?? '', dataSource: dataSource, indexCol: index, indexParent: indexParent, isMulti: isMulti ?? false, objHeaderWidthFixLeft: objHeaderWidthFixLeft, objHeaderWidthFixRight: objHeaderWidthFixRight, selectEnable: true, selectedRows: selectedRows, setSelectedRows: setSelectedRows, container: gridRef, filterBy: filterBy, orderBy: orderBy, optionsFilter: querySetting?.optionsFilter, allowFiltering: querySetting?.allowFiltering, allowSorting: querySetting?.allowSorting, formatSetting: formatSetting, changeFilter: (val) => {
69164
69199
  setFilterBy([...val]);
69165
69200
  if (querySetting?.changeFilter) {
@@ -69189,7 +69224,9 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
69189
69224
  left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
69190
69225
  right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined,
69191
69226
  textAlign: col.textAlign ? col.textAlign : 'left'
69192
- }, children: jsx("div", { className: "r-footer-div", children: (item || col.haveSum === true) && Number(item?.value ?? '0') < 0 ? jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${sumValue}${formatSetting?.suffixNegative ?? ''}`] }) : sumValue }) }, `summarycell-${indexCol}`));
69227
+ }, children: jsx("div", { className: "r-footer-div", children: (item || col.haveSum === true) && Number(item?.value ?? '0') < 0 ? (jsxs("div", { style: {
69228
+ color: formatSetting?.colorNegative ?? 'red'
69229
+ }, children: [' ', `${formatSetting?.prefixNegative ?? '-'}${sumValue}${formatSetting?.suffixNegative ?? ''}`] })) : (sumValue) }) }, `summarycell-${indexCol}`));
69193
69230
  }) })) })] }), jsx("div", { ref: virtualDivRef }), context && (contextMenuItems?.length ?? 0) > 0 && handleContextMenuClick && (jsx(Popover$1, { className: "r-context-popover", placement: "right-start", isOpen: context.show, target: virtualDivRef.current, toggle: handleCloseContext, fade: false, children: jsx(PopoverBody$1, { children: contextMenuItems?.map((item, index) => {
69194
69231
  return (jsxs("div", { className: "r-context-item", onClick: () => {
69195
69232
  handleCloseContext();
@@ -69199,7 +69236,14 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
69199
69236
  setOpenPopupSetupColumn(!openPopupSetupColumn);
69200
69237
  }, settingColumns: settingColumns, openSidebar: openPopupSetupColumn, column: [...contentColumns], resetDefaultColumns: resetDefaultColumns, setColumn: (newColumns) => {
69201
69238
  if (saveSettingColumn) {
69202
- saveSettingColumn(newColumns.map((x, index) => ({ field: x.field, headerText: x.headerDisplay, visible: x.visible, fixedType: x.fixedType, width: x.width, sortOrder: index + 1 })));
69239
+ saveSettingColumn(newColumns.map((x, index) => ({
69240
+ field: x.field,
69241
+ headerText: x.headerDisplay,
69242
+ visible: x.visible,
69243
+ fixedType: x.fixedType,
69244
+ width: x.width,
69245
+ sortOrder: index + 1
69246
+ })));
69203
69247
  }
69204
69248
  } })] }));
69205
69249
  };