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.js CHANGED
@@ -68743,9 +68743,24 @@ const RenderContentCol = (props) => {
68743
68743
  const element = document.getElementById(cellId);
68744
68744
  return element && element.scrollWidth > element.clientWidth;
68745
68745
  };
68746
+ const toggleSelect = () => {
68747
+ const idx = selectedRows?.findIndex((x) => x?.[fieldKey] === row?.[fieldKey]);
68748
+ if (idx > -1) {
68749
+ if (isMulti) {
68750
+ return selectedRows?.filter((_, i) => i !== idx);
68751
+ }
68752
+ return [];
68753
+ }
68754
+ if (isMulti) {
68755
+ return [...selectedRows, row];
68756
+ }
68757
+ return [row];
68758
+ };
68746
68759
  const RenderElement = () => {
68747
68760
  if (col.field === '#' || col.type === '#') {
68748
- return (jsxRuntime.jsx("div", { className: classNames$1('r-rowcell-div cursor-pointer text-center', { 'r-active-cell': isSelected }), style: {
68761
+ return (jsxRuntime.jsx("div", { className: classNames$1('r-rowcell-div cursor-pointer text-center', {
68762
+ 'r-active-cell': isSelected
68763
+ }), style: {
68749
68764
  fontWeight: row.sortOrder < 0 || row.sortOrder > 100000 || row.haveBoldType ? 600 : 400,
68750
68765
  fontStyle: row.haveItalicType ? 'italic' : 'normal'
68751
68766
  }, onDoubleClick: (e) => {
@@ -68755,25 +68770,14 @@ const RenderContentCol = (props) => {
68755
68770
  }, children: indexRow + 1 }));
68756
68771
  }
68757
68772
  else if (col.type === 'checkbox' || col.field === 'checkbox') {
68758
- return (jsxRuntime.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) => {
68759
- const index = selectedRows?.findIndex((x) => x[fieldKey] === row[fieldKey]);
68760
- if (index > -1) {
68761
- if (isMulti) {
68762
- selectedRows?.splice(index, 1);
68763
- setSelectedRows([...selectedRows]);
68764
- }
68765
- else {
68766
- setSelectedRows([]);
68767
- }
68768
- }
68769
- else {
68770
- if (isMulti) {
68771
- setSelectedRows([...selectedRows, row]);
68772
- }
68773
- else {
68774
- setSelectedRows([row]);
68775
- }
68776
- }
68773
+ return (jsxRuntime.jsx("div", { className: classNames$1('r-rowcell-div cursor-pointer', {
68774
+ 'r-active-cell': isSelected
68775
+ }), style: {
68776
+ display: 'flex',
68777
+ justifyContent: col.textAlign === 'center' ? 'center' : col.textAlign === 'right' ? 'flex-end' : 'flex-start',
68778
+ alignItems: 'center'
68779
+ }, onClick: (e) => {
68780
+ setSelectedRows(toggleSelect());
68777
68781
  e.stopPropagation();
68778
68782
  }, children: jsxRuntime.jsx(Input$1, { defaultChecked: isSelected, type: "checkbox", className: "cursor-pointer", style: { textAlign: col.textAlign ?? 'center' } }) }));
68779
68783
  }
@@ -68800,13 +68804,11 @@ const RenderContentCol = (props) => {
68800
68804
  const prefix = isNegative ? formatSetting?.prefixNegative ?? '-' : '';
68801
68805
  const suffix = isNegative ? formatSetting?.suffixNegative ?? '' : '';
68802
68806
  const displayText = isNegative ? `${prefix}${value}${suffix}` : value ?? '';
68803
- return (jsxRuntime.jsxs("div", { className: classNames$1('r-rowcell-div cursor-pointer', { 'r-active-cell': isSelected }), style: {
68807
+ return (jsxRuntime.jsxs("div", { className: classNames$1('r-rowcell-div cursor-pointer', {
68808
+ 'r-active-cell': isSelected
68809
+ }), style: {
68804
68810
  fontWeight: row.sortOrder < 0 || row.sortOrder > 100000 || row.haveBoldType ? 600 : 400,
68805
68811
  fontStyle: row.haveItalicType ? 'italic' : 'normal'
68806
- }, onDoubleClick: (e) => {
68807
- e.preventDefault();
68808
- handleCloseContext();
68809
- handleDoubleClick?.(row, col);
68810
68812
  }, children: [jsxRuntime.jsx("div", { className: "r-cell-text", style: {
68811
68813
  display: 'flex',
68812
68814
  justifyContent: col.textAlign === 'center' ? 'center' : col.textAlign === 'right' ? 'flex-end' : 'flex-start',
@@ -68823,31 +68825,40 @@ const RenderContentCol = (props) => {
68823
68825
  }, children: displayText }) }))] }));
68824
68826
  }
68825
68827
  };
68826
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: col.visible !== false && col.isGroup !== true && (jsxRuntime.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: {
68828
+ const clickTimerRef = React$5.useRef(null);
68829
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: col.visible !== false && col.isGroup !== true && (jsxRuntime.jsx("td", { className: classNames$1(`r-rowcell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, {
68830
+ 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight)
68831
+ }, { 'r-active': isSelected }), style: {
68827
68832
  left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
68828
68833
  right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined
68829
68834
  }, onClick: (e) => {
68830
- if (e.target.nodeName === 'DIV' || e.target.nodeName === 'TD') {
68831
- const index = selectedRows?.findIndex((x) => x[fieldKey] === row[fieldKey]);
68832
- if (index > -1) {
68833
- if (isMulti) {
68834
- selectedRows?.splice(index, 1);
68835
- setSelectedRows([...selectedRows]);
68836
- }
68837
- else {
68838
- setSelectedRows([]);
68839
- }
68840
- }
68841
- else {
68842
- if (isMulti) {
68843
- setSelectedRows([...selectedRows, row]);
68844
- }
68845
- else {
68846
- setSelectedRows([row]);
68847
- }
68848
- }
68849
- e.stopPropagation();
68835
+ const tag = e.target?.nodeName;
68836
+ if (tag !== 'DIV' && tag !== 'TD') {
68837
+ return;
68850
68838
  }
68839
+ if (clickTimerRef.current) {
68840
+ window.clearTimeout(clickTimerRef.current);
68841
+ }
68842
+ if (handleDoubleClick) {
68843
+ clickTimerRef.current = window.setTimeout(() => {
68844
+ setSelectedRows(toggleSelect());
68845
+ clickTimerRef.current = null;
68846
+ }, 200);
68847
+ }
68848
+ else {
68849
+ setSelectedRows(toggleSelect());
68850
+ clickTimerRef.current = null;
68851
+ }
68852
+ }, onDoubleClick: (e) => {
68853
+ // hủy single click pending để không đổi style trước
68854
+ if (clickTimerRef.current) {
68855
+ window.clearTimeout(clickTimerRef.current);
68856
+ }
68857
+ clickTimerRef.current = null;
68858
+ handleCloseContext();
68859
+ handleDoubleClick?.(row, col);
68860
+ e.preventDefault();
68861
+ e.stopPropagation();
68851
68862
  }, children: RenderElement() }, `col-${indexRow}-${indexCol}`)) }));
68852
68863
  };
68853
68864
 
@@ -68982,7 +68993,11 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
68982
68993
  return (jsxRuntime.jsx("div", { className: "me-50 r-search", children: jsxRuntime.jsx(ReactInput, { style: { width: '230px' }, value: searchSetting?.searchTerm !== undefined ? searchSetting?.searchTerm : searchTerm, setSearchTerm: searchSetting?.setSearchTerm ? searchSetting?.setSearchTerm : setSearchTerm, placeholder: t('Search'), onKeyPress: handleKeyPress }) }));
68983
68994
  };
68984
68995
  const groupbtnTemplate = () => {
68985
- return (jsxRuntime.jsxs(UncontrolledDropdown, { children: [jsxRuntime.jsx(DropdownToggle$1, { tag: "div", id: "group-dropdown-toggle", style: { position: 'relative' }, onClick: (e) => e.preventDefault(), children: jsxRuntime.jsx(GroupIcon, { color: "#7F7F7F", size: 24 }) }), jsxRuntime.jsxs(DropdownMenu$1, { className: "formula-dropdown icon-dropdown p-1", children: [jsxRuntime.jsx("div", { className: "mb-1", style: { fontSize: 16, fontWeight: 500 }, children: "Nh\u00F3m d\u1EEF li\u1EC7u theo c\u1ED9t" }), jsxRuntime.jsxs("div", { className: 'form-group', children: [jsxRuntime.jsx(Label$1, { id: `label-group-1`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 1" }), jsxRuntime.jsx("div", { className: "form-input", children: jsxRuntime.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) => {
68996
+ return (jsxRuntime.jsxs(UncontrolledDropdown, { children: [jsxRuntime.jsx(DropdownToggle$1, { tag: "div", id: "group-dropdown-toggle", style: { position: 'relative' }, onClick: (e) => e.preventDefault(), children: jsxRuntime.jsx(GroupIcon, { color: "#7F7F7F", size: 24 }) }), jsxRuntime.jsxs(DropdownMenu$1, { className: "formula-dropdown icon-dropdown p-1", children: [jsxRuntime.jsx("div", { className: "mb-1", style: { fontSize: 16, fontWeight: 500 }, children: "Nh\u00F3m d\u1EEF li\u1EC7u theo c\u1ED9t" }), jsxRuntime.jsxs("div", { className: 'form-group', children: [jsxRuntime.jsx(Label$1, { id: `label-group-1`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 1" }), jsxRuntime.jsx("div", { className: "form-input", children: jsxRuntime.jsx(SelectTable, { options: contentColumns, fieldLabel: 'headerText', fieldValue: 'field', value: groupColumns[0]
68997
+ ? {
68998
+ headerText: t(contentColumns.find((x) => x.field === groupColumns[0])?.headerText ?? contentColumns.find((x) => x.field === groupColumns[0])?.headerText)
68999
+ }
69000
+ : undefined, onChange: (val) => {
68986
69001
  if (val) {
68987
69002
  groupColumns[0] = val.field;
68988
69003
  }
@@ -68990,7 +69005,11 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
68990
69005
  groupColumns.pop();
68991
69006
  }
68992
69007
  setGroupColumns([...groupColumns]);
68993
- }, isClearable: groupColumns?.length === 1 }) })] }), jsxRuntime.jsxs("div", { className: 'form-group', children: [jsxRuntime.jsx(Label$1, { id: `label-group-2`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 2" }), jsxRuntime.jsx("div", { className: "form-input", children: jsxRuntime.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) => {
69008
+ }, isClearable: groupColumns?.length === 1 }) })] }), jsxRuntime.jsxs("div", { className: 'form-group', children: [jsxRuntime.jsx(Label$1, { id: `label-group-2`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 2" }), jsxRuntime.jsx("div", { className: "form-input", children: jsxRuntime.jsx(SelectTable, { options: contentColumns, fieldLabel: 'headerText', fieldValue: 'field', value: groupColumns[1]
69009
+ ? {
69010
+ headerText: t(contentColumns.find((x) => x.field === groupColumns[1])?.headerText ?? contentColumns.find((x) => x.field === groupColumns[1])?.headerText)
69011
+ }
69012
+ : undefined, onChange: (val) => {
68994
69013
  if (val) {
68995
69014
  groupColumns[1] = val.field;
68996
69015
  }
@@ -68998,7 +69017,11 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
68998
69017
  groupColumns.pop();
68999
69018
  }
69000
69019
  setGroupColumns([...groupColumns]);
69001
- }, isClearable: groupColumns?.length === 2 }) })] }), jsxRuntime.jsxs("div", { className: 'form-group', children: [jsxRuntime.jsx(Label$1, { id: `label-group-3`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 3" }), jsxRuntime.jsx("div", { className: "form-input", children: jsxRuntime.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) => {
69020
+ }, isClearable: groupColumns?.length === 2 }) })] }), jsxRuntime.jsxs("div", { className: 'form-group', children: [jsxRuntime.jsx(Label$1, { id: `label-group-3`, style: { fontWeight: 500, fontSize: 13 }, children: "M\u1EE9c 3" }), jsxRuntime.jsx("div", { className: "form-input", children: jsxRuntime.jsx(SelectTable, { options: contentColumns, fieldLabel: 'headerText', fieldValue: 'field', value: groupColumns[2]
69021
+ ? {
69022
+ headerText: t(contentColumns.find((x) => x.field === groupColumns[2])?.headerText ?? contentColumns.find((x) => x.field === groupColumns[2])?.headerText)
69023
+ }
69024
+ : undefined, onChange: (val) => {
69002
69025
  if (groupSetting) {
69003
69026
  if (val) {
69004
69027
  groupColumns[2] = val.field;
@@ -69009,7 +69032,9 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
69009
69032
  setGroupColumns([...groupColumns]);
69010
69033
  }
69011
69034
  }, isClearable: groupColumns?.length === 3 }) })] }), jsxRuntime.jsxs("div", { className: "border-top d-flex justify-content-end mt-1", children: [jsxRuntime.jsx(Button$1$1, { color: "primary", className: "mt-1 me-50 rounded", size: "sm", onClick: () => {
69012
- groupSetting?.onGroup({ columnGrouped: groupColumns.filter((x) => x) });
69035
+ groupSetting?.onGroup({
69036
+ columnGrouped: groupColumns.filter((x) => x)
69037
+ });
69013
69038
  document.getElementById('group-dropdown-toggle')?.click();
69014
69039
  }, children: `${t('Apply')}` }), jsxRuntime.jsx(Button$1$1, { color: "secondary", outline: true, className: "mt-1 rounded", size: "sm", onClick: () => {
69015
69040
  groupSetting?.onGroup({ columnGrouped: [] });
@@ -69062,8 +69087,6 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
69062
69087
  }
69063
69088
  };
69064
69089
  React$5.useEffect(() => {
69065
- console.log(selectedRows);
69066
- console.log(isMulti);
69067
69090
  if (setSelectedItem) {
69068
69091
  if (isMulti) {
69069
69092
  if (dataSource && selectedRows && selectedRows?.length !== selectedItem?.length) {
@@ -69132,7 +69155,10 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
69132
69155
  if (col.template) {
69133
69156
  value = col.template(row, indexRow) ?? '';
69134
69157
  }
69135
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("tr", { "aria-rowindex": indexRow + 1, role: "row", className: "r-row", children: [jsxRuntime.jsx("td", { className: "r-rowcell r-cell-group", colSpan: 3, children: jsxRuntime.jsxs("div", { className: "r-rowcell-div", children: [jsxRuntime.jsx(SvgChevronRight, { style: { marginLeft: level * 20, transform: expand ? 'rotate(90deg)' : 'rotate(0deg)' }, fontSize: 15, onClick: () => {
69158
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("tr", { "aria-rowindex": indexRow + 1, role: "row", className: "r-row", children: [jsxRuntime.jsx("td", { className: "r-rowcell r-cell-group", colSpan: 3, children: jsxRuntime.jsxs("div", { className: "r-rowcell-div", children: [jsxRuntime.jsx(SvgChevronRight, { style: {
69159
+ marginLeft: level * 20,
69160
+ transform: expand ? 'rotate(90deg)' : 'rotate(0deg)'
69161
+ }, fontSize: 15, onClick: () => {
69136
69162
  setExpand(!expand);
69137
69163
  setExpandsAll(undefined);
69138
69164
  row.expand = !expand;
@@ -69153,12 +69179,18 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
69153
69179
  sumValue = '';
69154
69180
  }
69155
69181
  }
69156
- return (jsxRuntime.jsx("td", { className: "r-rowcell r-cell-sum-group", children: jsxRuntime.jsx("div", { className: "r-rowcell-div", style: { justifyContent: colSum.textAlign ? colSum.textAlign : 'left' }, children: (haveSum || colSum.haveSum === true) && Number(row[colSum.field] ?? '0') < 0 ? jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${sumValue}${formatSetting?.suffixNegative ?? ''}`] }) : sumValue }) }, `group-sum-cell-${level}-${indexRow}-${indexCol}`));
69182
+ return (jsxRuntime.jsx("td", { className: "r-rowcell r-cell-sum-group", children: jsxRuntime.jsx("div", { className: "r-rowcell-div", style: {
69183
+ justifyContent: colSum.textAlign ? colSum.textAlign : 'left'
69184
+ }, children: (haveSum || colSum.haveSum === true) && Number(row[colSum.field] ?? '0') < 0 ? (jsxRuntime.jsxs("div", { style: {
69185
+ color: formatSetting?.colorNegative ?? 'red'
69186
+ }, children: [' ', `${formatSetting?.prefixNegative ?? '-'}${sumValue}${formatSetting?.suffixNegative ?? ''}`] })) : (sumValue) }) }, `group-sum-cell-${level}-${indexRow}-${indexCol}`));
69157
69187
  })] }), expand && jsxRuntime.jsx(RenderContent, { datas: row.children, level: level + 1 })] }, `row-${level}-${indexRow}`));
69158
69188
  }
69159
69189
  else {
69160
69190
  const isSelected = selectedRows?.some((x) => x[fieldKey] === row[fieldKey]);
69161
- return (jsxRuntime.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) => {
69191
+ return (jsxRuntime.jsx("tr", { id: `row-content-${indexRow}`, "aria-rowindex": indexRow + 1, role: "row", className: classNames$1('r-row', {
69192
+ 'r-last-row': level === 0 && indexRow === viewData.length - 1
69193
+ }), onContextMenu: (e) => {
69162
69194
  e.preventDefault();
69163
69195
  handleContextMenu(e, row);
69164
69196
  }, children: contentColumns.map((column, indexCol) => (jsxRuntime.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}`));
@@ -69188,7 +69220,10 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
69188
69220
  virtualDivRef.current.style.height = '0px';
69189
69221
  }
69190
69222
  }, [context]);
69191
- return (jsxRuntime.jsxs("div", { className: "r-table-edit r-virtualized-table", children: [jsxRuntime.jsxs("div", { className: "r-grid", children: [toolbarSetting?.showTopToolbar && jsxRuntime.jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption }), headerComponent && headerComponent(), jsxRuntime.jsxs("div", { ref: gridRef, className: "r-gridtable", style: { height: `${height ? `${height}px` : 'auto'}`, position: 'relative' }, children: [jsxRuntime.jsxs("table", { role: "presentation", style: { width: '100%' }, children: [jsxRuntime.jsx(RenderColGroup, { contentColumns: contentColumns }), jsxRuntime.jsx("thead", { className: "r-gridheader", role: "rowgroup", children: headerColumns.map((rowColumn, indexParent) => {
69223
+ return (jsxRuntime.jsxs("div", { className: "r-table-edit r-virtualized-table", children: [jsxRuntime.jsxs("div", { className: "r-grid", children: [toolbarSetting?.showTopToolbar && jsxRuntime.jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption }), headerComponent && headerComponent(), jsxRuntime.jsxs("div", { ref: gridRef, className: "r-gridtable", style: {
69224
+ height: `${height ? `${height}px` : 'auto'}`,
69225
+ position: 'relative'
69226
+ }, children: [jsxRuntime.jsxs("table", { role: "presentation", style: { width: '100%' }, children: [jsxRuntime.jsx(RenderColGroup, { contentColumns: contentColumns }), jsxRuntime.jsx("thead", { className: "r-gridheader", role: "rowgroup", children: headerColumns.map((rowColumn, indexParent) => {
69192
69227
  return (jsxRuntime.jsx("tr", { className: "r-row", role: "row", children: rowColumn.map((col, index) => (jsxRuntime.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) => {
69193
69228
  setFilterBy([...val]);
69194
69229
  if (querySetting?.changeFilter) {
@@ -69218,7 +69253,9 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
69218
69253
  left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
69219
69254
  right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined,
69220
69255
  textAlign: col.textAlign ? col.textAlign : 'left'
69221
- }, children: jsxRuntime.jsx("div", { className: "r-footer-div", children: (item || col.haveSum === true) && Number(item?.value ?? '0') < 0 ? jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${sumValue}${formatSetting?.suffixNegative ?? ''}`] }) : sumValue }) }, `summarycell-${indexCol}`));
69256
+ }, children: jsxRuntime.jsx("div", { className: "r-footer-div", children: (item || col.haveSum === true) && Number(item?.value ?? '0') < 0 ? (jsxRuntime.jsxs("div", { style: {
69257
+ color: formatSetting?.colorNegative ?? 'red'
69258
+ }, children: [' ', `${formatSetting?.prefixNegative ?? '-'}${sumValue}${formatSetting?.suffixNegative ?? ''}`] })) : (sumValue) }) }, `summarycell-${indexCol}`));
69222
69259
  }) })) })] }), jsxRuntime.jsx("div", { ref: virtualDivRef }), context && (contextMenuItems?.length ?? 0) > 0 && handleContextMenuClick && (jsxRuntime.jsx(Popover$1, { className: "r-context-popover", placement: "right-start", isOpen: context.show, target: virtualDivRef.current, toggle: handleCloseContext, fade: false, children: jsxRuntime.jsx(PopoverBody$1, { children: contextMenuItems?.map((item, index) => {
69223
69260
  return (jsxRuntime.jsxs("div", { className: "r-context-item", onClick: () => {
69224
69261
  handleCloseContext();
@@ -69228,7 +69265,14 @@ const TableView = ({ idTable, dataSource, height = 400, haveSum, columns, isLoad
69228
69265
  setOpenPopupSetupColumn(!openPopupSetupColumn);
69229
69266
  }, settingColumns: settingColumns, openSidebar: openPopupSetupColumn, column: [...contentColumns], resetDefaultColumns: resetDefaultColumns, setColumn: (newColumns) => {
69230
69267
  if (saveSettingColumn) {
69231
- saveSettingColumn(newColumns.map((x, index) => ({ field: x.field, headerText: x.headerDisplay, visible: x.visible, fixedType: x.fixedType, width: x.width, sortOrder: index + 1 })));
69268
+ saveSettingColumn(newColumns.map((x, index) => ({
69269
+ field: x.field,
69270
+ headerText: x.headerDisplay,
69271
+ visible: x.visible,
69272
+ fixedType: x.fixedType,
69273
+ width: x.width,
69274
+ sortOrder: index + 1
69275
+ })));
69232
69276
  }
69233
69277
  } })] }));
69234
69278
  };