es-grid-template 1.5.3 → 1.5.5
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.
|
@@ -187,25 +187,6 @@ const InternalTable = props => {
|
|
|
187
187
|
return propRowKey ?? 'rowId';
|
|
188
188
|
}, [propRowKey]);
|
|
189
189
|
const [scrollHeight, setHeight] = useState(0);
|
|
190
|
-
|
|
191
|
-
// const heightt = React.useMemo(() => {
|
|
192
|
-
//
|
|
193
|
-
// const table = document.querySelector(`#${id}`)
|
|
194
|
-
// console.log('table', table)
|
|
195
|
-
//
|
|
196
|
-
// const title: any = table?.querySelector(`.ui-rc-table-title`)
|
|
197
|
-
//
|
|
198
|
-
// console.log('title', title)
|
|
199
|
-
//
|
|
200
|
-
// if (title) {
|
|
201
|
-
// const titleHeight = title.offsetHeight;
|
|
202
|
-
// console.log('Chiều cao:', titleHeight);
|
|
203
|
-
// }
|
|
204
|
-
//
|
|
205
|
-
// return (height ?? 0) - (title ? title.offsetHeight : 0)
|
|
206
|
-
//
|
|
207
|
-
// }, [height, id])
|
|
208
|
-
|
|
209
190
|
const local = lang && lang === 'en' ? en : vi;
|
|
210
191
|
const dateRangeLocale = lang && lang === 'en' ? enDr : viDr;
|
|
211
192
|
const buddhistLocale = {
|
|
@@ -376,7 +357,7 @@ const InternalTable = props => {
|
|
|
376
357
|
}
|
|
377
358
|
}
|
|
378
359
|
}
|
|
379
|
-
}), [
|
|
360
|
+
}), [t, propDataSourceFilter, buddhistLocale, locale, format, dateRangeLocale]);
|
|
380
361
|
const convertColumns = React.useMemo(() => {
|
|
381
362
|
return flatColumns2(columns).map((column, colIndex) => {
|
|
382
363
|
if (column === SELECTION_COLUMN) {
|
|
@@ -411,8 +392,11 @@ const InternalTable = props => {
|
|
|
411
392
|
},
|
|
412
393
|
t: t
|
|
413
394
|
}),
|
|
414
|
-
onCell:
|
|
415
|
-
className: 'cell-number'
|
|
395
|
+
onCell: data => ({
|
|
396
|
+
// className: 'cell-number',
|
|
397
|
+
className: classNames('cell-number', {
|
|
398
|
+
'cell-group': groupColumns && data.children
|
|
399
|
+
})
|
|
416
400
|
}),
|
|
417
401
|
render: (val, record) => {
|
|
418
402
|
if (pagination && pagination.onChange && pagination.currentPage && pagination.pageSize) {
|
|
@@ -431,8 +415,11 @@ const InternalTable = props => {
|
|
|
431
415
|
},
|
|
432
416
|
t: t
|
|
433
417
|
}),
|
|
434
|
-
onCell:
|
|
435
|
-
className: 'cell-number',
|
|
418
|
+
onCell: data => ({
|
|
419
|
+
// className: 'cell-number',
|
|
420
|
+
className: classNames('', {
|
|
421
|
+
'cell-group': groupColumns && data.children
|
|
422
|
+
}),
|
|
436
423
|
style: {
|
|
437
424
|
padding: '2px 8px'
|
|
438
425
|
}
|
|
@@ -115,11 +115,9 @@ const Group = props => {
|
|
|
115
115
|
t: t,
|
|
116
116
|
id: id,
|
|
117
117
|
rowKey: rowKey,
|
|
118
|
-
columns: columns
|
|
119
|
-
style:
|
|
120
|
-
|
|
121
|
-
minHeight: height
|
|
122
|
-
},
|
|
118
|
+
columns: columns
|
|
119
|
+
// style={{...style, minHeight: height}}
|
|
120
|
+
,
|
|
123
121
|
rowHoverable: rowHoverable ?? true,
|
|
124
122
|
dataSource: dataSource,
|
|
125
123
|
getRowKey: getRowKey,
|
|
@@ -198,25 +198,6 @@ const InternalTable = props => {
|
|
|
198
198
|
return propRowKey ?? 'rowId';
|
|
199
199
|
}, [propRowKey]);
|
|
200
200
|
const [scrollHeight, setHeight] = (0, _react.useState)(0);
|
|
201
|
-
|
|
202
|
-
// const heightt = React.useMemo(() => {
|
|
203
|
-
//
|
|
204
|
-
// const table = document.querySelector(`#${id}`)
|
|
205
|
-
// console.log('table', table)
|
|
206
|
-
//
|
|
207
|
-
// const title: any = table?.querySelector(`.ui-rc-table-title`)
|
|
208
|
-
//
|
|
209
|
-
// console.log('title', title)
|
|
210
|
-
//
|
|
211
|
-
// if (title) {
|
|
212
|
-
// const titleHeight = title.offsetHeight;
|
|
213
|
-
// console.log('Chiều cao:', titleHeight);
|
|
214
|
-
// }
|
|
215
|
-
//
|
|
216
|
-
// return (height ?? 0) - (title ? title.offsetHeight : 0)
|
|
217
|
-
//
|
|
218
|
-
// }, [height, id])
|
|
219
|
-
|
|
220
201
|
const local = lang && lang === 'en' ? _en_US.default : _vi_VN.default;
|
|
221
202
|
const dateRangeLocale = lang && lang === 'en' ? _en_US2.default : _vi_VN2.default;
|
|
222
203
|
const buddhistLocale = {
|
|
@@ -387,7 +368,7 @@ const InternalTable = props => {
|
|
|
387
368
|
}
|
|
388
369
|
}
|
|
389
370
|
}
|
|
390
|
-
}), [
|
|
371
|
+
}), [t, propDataSourceFilter, buddhistLocale, locale, format, dateRangeLocale]);
|
|
391
372
|
const convertColumns = _react.default.useMemo(() => {
|
|
392
373
|
return (0, _columns.flatColumns2)(columns).map((column, colIndex) => {
|
|
393
374
|
if (column === SELECTION_COLUMN) {
|
|
@@ -422,8 +403,11 @@ const InternalTable = props => {
|
|
|
422
403
|
},
|
|
423
404
|
t: t
|
|
424
405
|
}),
|
|
425
|
-
onCell:
|
|
426
|
-
className: 'cell-number'
|
|
406
|
+
onCell: data => ({
|
|
407
|
+
// className: 'cell-number',
|
|
408
|
+
className: (0, _classnames.default)('cell-number', {
|
|
409
|
+
'cell-group': groupColumns && data.children
|
|
410
|
+
})
|
|
427
411
|
}),
|
|
428
412
|
render: (val, record) => {
|
|
429
413
|
if (pagination && pagination.onChange && pagination.currentPage && pagination.pageSize) {
|
|
@@ -442,8 +426,11 @@ const InternalTable = props => {
|
|
|
442
426
|
},
|
|
443
427
|
t: t
|
|
444
428
|
}),
|
|
445
|
-
onCell:
|
|
446
|
-
className: 'cell-number',
|
|
429
|
+
onCell: data => ({
|
|
430
|
+
// className: 'cell-number',
|
|
431
|
+
className: (0, _classnames.default)('', {
|
|
432
|
+
'cell-group': groupColumns && data.children
|
|
433
|
+
}),
|
|
447
434
|
style: {
|
|
448
435
|
padding: '2px 8px'
|
|
449
436
|
}
|
|
@@ -124,11 +124,9 @@ const Group = props => {
|
|
|
124
124
|
t: t,
|
|
125
125
|
id: id,
|
|
126
126
|
rowKey: rowKey,
|
|
127
|
-
columns: columns
|
|
128
|
-
style:
|
|
129
|
-
|
|
130
|
-
minHeight: height
|
|
131
|
-
},
|
|
127
|
+
columns: columns
|
|
128
|
+
// style={{...style, minHeight: height}}
|
|
129
|
+
,
|
|
132
130
|
rowHoverable: rowHoverable ?? true,
|
|
133
131
|
dataSource: dataSource,
|
|
134
132
|
getRowKey: getRowKey,
|