es-grid-template 1.8.21 → 1.8.22
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/es/table-component/TableContainerEdit.js +2 -1
- package/es/table-component/body/TableBodyCell.js +0 -1
- package/es/table-component/body/TableBodyCellEdit.js +14 -6
- package/es/table-component/useContext.d.ts +2 -1
- package/lib/table-component/TableContainerEdit.js +2 -1
- package/lib/table-component/body/TableBodyCell.js +0 -1
- package/lib/table-component/body/TableBodyCellEdit.js +14 -6
- package/lib/table-component/useContext.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1819,7 +1819,8 @@ const TableContainerEdit = props => {
|
|
|
1819
1819
|
handleAddMulti,
|
|
1820
1820
|
dataErrors,
|
|
1821
1821
|
windowSize,
|
|
1822
|
-
handleCellClick
|
|
1822
|
+
handleCellClick,
|
|
1823
|
+
pagination
|
|
1823
1824
|
}
|
|
1824
1825
|
}, /*#__PURE__*/React.createElement(TableWrapper, {
|
|
1825
1826
|
contextMenuItems: contextMenuItems,
|
|
@@ -358,7 +358,6 @@ const TableBodyCell = props => {
|
|
|
358
358
|
// height: '36px',
|
|
359
359
|
...getCommonPinningStyles(cell.column)
|
|
360
360
|
},
|
|
361
|
-
onMouseDown: () => {},
|
|
362
361
|
onMouseEnter: e => {
|
|
363
362
|
if (e.target.firstChild?.clientWidth < e.target.firstChild?.scrollWidth) {
|
|
364
363
|
setIsOpenTooltip(true);
|
|
@@ -19,13 +19,19 @@ import { nonActionColumn } from "../hook/constant";
|
|
|
19
19
|
const renderCellIndex = props => {
|
|
20
20
|
const {
|
|
21
21
|
parrents,
|
|
22
|
-
cell
|
|
22
|
+
cell,
|
|
23
|
+
pagination
|
|
23
24
|
} = props;
|
|
25
|
+
if (parrents && parrents.length > 0) {
|
|
26
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
27
|
+
className: "ui-rc_cell-content"
|
|
28
|
+
}, parrents.map(pr => {
|
|
29
|
+
return `${pr.index + 1}.`;
|
|
30
|
+
}), cell.row.index + 1);
|
|
31
|
+
}
|
|
24
32
|
return /*#__PURE__*/React.createElement("span", {
|
|
25
33
|
className: "ui-rc_cell-content"
|
|
26
|
-
},
|
|
27
|
-
return `${pr.index + 1}.`;
|
|
28
|
-
}), cell.row.index + 1);
|
|
34
|
+
}, cell.row.index + (pagination ? (pagination.currentPage ?? 1 - 1) * (pagination?.pageSize ?? 0) : 0) + 1);
|
|
29
35
|
};
|
|
30
36
|
const renderCommand = args => {
|
|
31
37
|
const {
|
|
@@ -189,7 +195,8 @@ const TableBodyCellEdit = props => {
|
|
|
189
195
|
isDataTree,
|
|
190
196
|
handleCellClick,
|
|
191
197
|
setIsSelectionChange,
|
|
192
|
-
selectionSettings
|
|
198
|
+
selectionSettings,
|
|
199
|
+
pagination
|
|
193
200
|
} = React.useContext(TableContext);
|
|
194
201
|
const expandIconColumnIndex = expandable?.expandIconColumnIndex;
|
|
195
202
|
const record = cell.row.original;
|
|
@@ -828,7 +835,8 @@ const TableBodyCellEdit = props => {
|
|
|
828
835
|
className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-spaced"
|
|
829
836
|
}))), renderCellIndex({
|
|
830
837
|
parrents,
|
|
831
|
-
cell
|
|
838
|
+
cell,
|
|
839
|
+
pagination
|
|
832
840
|
}));
|
|
833
841
|
}
|
|
834
842
|
if (cell.column.id === "command") {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import type { ColumnTable, ExpandableConfig, IFormat, IWrapSettings, Locale, RangeState, RecordDoubleClickEventArgs, SelectionSettings } from "./type";
|
|
2
|
+
import type { ColumnTable, ExpandableConfig, IFormat, IWrapSettings, Locale, PaginationConfig, RangeState, RecordDoubleClickEventArgs, SelectionSettings } from "./type";
|
|
3
3
|
import type { SubmitHandler } from "react-hook-form";
|
|
4
4
|
import type { ExpandedState } from '@tanstack/react-table';
|
|
5
5
|
export type IPositionCell = {
|
|
@@ -67,6 +67,7 @@ export interface IContext<T> {
|
|
|
67
67
|
dataErrors?: any[];
|
|
68
68
|
isDataTree: boolean;
|
|
69
69
|
handleCellClick?: (rowNumber: number, record: T, column: ColumnTable, rowId: string, cellValue: any) => void;
|
|
70
|
+
pagination?: false | PaginationConfig;
|
|
70
71
|
}
|
|
71
72
|
export declare const TableContext: import("react").Context<IContext<any>>;
|
|
72
73
|
export type ContextCellChange = {
|
|
@@ -1826,7 +1826,8 @@ const TableContainerEdit = props => {
|
|
|
1826
1826
|
handleAddMulti,
|
|
1827
1827
|
dataErrors,
|
|
1828
1828
|
windowSize,
|
|
1829
|
-
handleCellClick
|
|
1829
|
+
handleCellClick,
|
|
1830
|
+
pagination
|
|
1830
1831
|
}
|
|
1831
1832
|
}, /*#__PURE__*/_react.default.createElement(_TableWrapper.default, {
|
|
1832
1833
|
contextMenuItems: contextMenuItems,
|
|
@@ -365,7 +365,6 @@ const TableBodyCell = props => {
|
|
|
365
365
|
// height: '36px',
|
|
366
366
|
...(0, _utils.getCommonPinningStyles)(cell.column)
|
|
367
367
|
},
|
|
368
|
-
onMouseDown: () => {},
|
|
369
368
|
onMouseEnter: e => {
|
|
370
369
|
if (e.target.firstChild?.clientWidth < e.target.firstChild?.scrollWidth) {
|
|
371
370
|
setIsOpenTooltip(true);
|
|
@@ -25,13 +25,19 @@ var _constant = require("../hook/constant");
|
|
|
25
25
|
const renderCellIndex = props => {
|
|
26
26
|
const {
|
|
27
27
|
parrents,
|
|
28
|
-
cell
|
|
28
|
+
cell,
|
|
29
|
+
pagination
|
|
29
30
|
} = props;
|
|
31
|
+
if (parrents && parrents.length > 0) {
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
33
|
+
className: "ui-rc_cell-content"
|
|
34
|
+
}, parrents.map(pr => {
|
|
35
|
+
return `${pr.index + 1}.`;
|
|
36
|
+
}), cell.row.index + 1);
|
|
37
|
+
}
|
|
30
38
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
31
39
|
className: "ui-rc_cell-content"
|
|
32
|
-
},
|
|
33
|
-
return `${pr.index + 1}.`;
|
|
34
|
-
}), cell.row.index + 1);
|
|
40
|
+
}, cell.row.index + (pagination ? (pagination.currentPage ?? 1 - 1) * (pagination?.pageSize ?? 0) : 0) + 1);
|
|
35
41
|
};
|
|
36
42
|
const renderCommand = args => {
|
|
37
43
|
const {
|
|
@@ -195,7 +201,8 @@ const TableBodyCellEdit = props => {
|
|
|
195
201
|
isDataTree,
|
|
196
202
|
handleCellClick,
|
|
197
203
|
setIsSelectionChange,
|
|
198
|
-
selectionSettings
|
|
204
|
+
selectionSettings,
|
|
205
|
+
pagination
|
|
199
206
|
} = _react.default.useContext(_useContext.TableContext);
|
|
200
207
|
const expandIconColumnIndex = expandable?.expandIconColumnIndex;
|
|
201
208
|
const record = cell.row.original;
|
|
@@ -834,7 +841,8 @@ const TableBodyCellEdit = props => {
|
|
|
834
841
|
className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-spaced"
|
|
835
842
|
}))), renderCellIndex({
|
|
836
843
|
parrents,
|
|
837
|
-
cell
|
|
844
|
+
cell,
|
|
845
|
+
pagination
|
|
838
846
|
}));
|
|
839
847
|
}
|
|
840
848
|
if (cell.column.id === "command") {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import type { ColumnTable, ExpandableConfig, IFormat, IWrapSettings, Locale, RangeState, RecordDoubleClickEventArgs, SelectionSettings } from "./type";
|
|
2
|
+
import type { ColumnTable, ExpandableConfig, IFormat, IWrapSettings, Locale, PaginationConfig, RangeState, RecordDoubleClickEventArgs, SelectionSettings } from "./type";
|
|
3
3
|
import type { SubmitHandler } from "react-hook-form";
|
|
4
4
|
import type { ExpandedState } from '@tanstack/react-table';
|
|
5
5
|
export type IPositionCell = {
|
|
@@ -67,6 +67,7 @@ export interface IContext<T> {
|
|
|
67
67
|
dataErrors?: any[];
|
|
68
68
|
isDataTree: boolean;
|
|
69
69
|
handleCellClick?: (rowNumber: number, record: T, column: ColumnTable, rowId: string, cellValue: any) => void;
|
|
70
|
+
pagination?: false | PaginationConfig;
|
|
70
71
|
}
|
|
71
72
|
export declare const TableContext: import("react").Context<IContext<any>>;
|
|
72
73
|
export type ContextCellChange = {
|