es-grid-template 1.8.1 → 1.8.21

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.
@@ -582,7 +582,7 @@ const TableContainerEdit = props => {
582
582
  marginBottom: '.25rem',
583
583
  fontSize: 14
584
584
  }
585
- }, "D\u1EEF li\u1EC7u sao ch\xE9p v\u01B0\u1EE3t qu\xE1 s\u1ED1 d\xF2ng cho ph\xE9p (500 d\xF2ng).Ph\u1EA7n m\u1EC1n s\u1EBD ch\u1EC9 l\u1EA5y 500 d\xF2ng \u0111\u1EA7u ti\xEAn."), /*#__PURE__*/React.createElement(Title, {
585
+ }, "D\u1EEF li\u1EC7u sao ch\xE9p v\u01B0\u1EE3t qu\xE1 s\u1ED1 d\xF2ng cho ph\xE9p (", onCellPaste?.maxRowsPaste ?? 200, " d\xF2ng).Ph\u1EA7n m\u1EC1n s\u1EBD ch\u1EC9 l\u1EA5y 500 d\xF2ng \u0111\u1EA7u ti\xEAn."), /*#__PURE__*/React.createElement(Title, {
586
586
  level: 5,
587
587
  style: {
588
588
  marginTop: '.75rem'
@@ -28,7 +28,7 @@ const TableHead = ({
28
28
  zIndex: 1,
29
29
  // gridTemplateRows: `repeat(${table.getHeaderGroups().length}, auto)`,
30
30
  // gridTemplateColumns: `repeat(${table.getVisibleLeafColumns().length}, 1fr)`,
31
- gridTemplateColumns: `${table.getVisibleLeafColumns().map(n => `${n.getSize()}px`).join(" ")}`
31
+ gridTemplateColumns: `${table.getVisibleLeafColumns().map(n => `${n.getSize()}fr`).join(" ")}`
32
32
  }
33
33
  }, leafColumns.map(column => {
34
34
  const depth = column.depth ?? 0;
@@ -226,17 +226,18 @@ const TableHeadCell2 = props => {
226
226
  // rowSpan={rowSpan}
227
227
  ,
228
228
 
229
- key: header.id,
229
+ key: column.id,
230
230
  style: {
231
231
  // display: 'flex',
232
232
  // width: column.getSize(),
233
- minWidth: header.getSize(),
233
+ minWidth: column.getSize(),
234
234
  // flex: 1,
235
- flexGrow: header.getSize(),
235
+ // flexGrow: column.getSize(),
236
+
236
237
  gridRow: `${depth + 1} / span ${rowSpan}`,
237
238
  gridColumn: `span ${colSpan}`,
238
239
  // maxWidth: header.getSize(),
239
- ...getCommonPinningStyles(header.column),
240
+ ...getCommonPinningStyles(column),
240
241
  width: 'auto',
241
242
  ...style
242
243
  },
@@ -589,7 +589,7 @@ const TableContainerEdit = props => {
589
589
  marginBottom: '.25rem',
590
590
  fontSize: 14
591
591
  }
592
- }, "D\u1EEF li\u1EC7u sao ch\xE9p v\u01B0\u1EE3t qu\xE1 s\u1ED1 d\xF2ng cho ph\xE9p (500 d\xF2ng).Ph\u1EA7n m\u1EC1n s\u1EBD ch\u1EC9 l\u1EA5y 500 d\xF2ng \u0111\u1EA7u ti\xEAn."), /*#__PURE__*/_react.default.createElement(Title, {
592
+ }, "D\u1EEF li\u1EC7u sao ch\xE9p v\u01B0\u1EE3t qu\xE1 s\u1ED1 d\xF2ng cho ph\xE9p (", onCellPaste?.maxRowsPaste ?? 200, " d\xF2ng).Ph\u1EA7n m\u1EC1n s\u1EBD ch\u1EC9 l\u1EA5y 500 d\xF2ng \u0111\u1EA7u ti\xEAn."), /*#__PURE__*/_react.default.createElement(Title, {
593
593
  level: 5,
594
594
  style: {
595
595
  marginTop: '.75rem'
@@ -38,7 +38,7 @@ const TableHead = ({
38
38
  zIndex: 1,
39
39
  // gridTemplateRows: `repeat(${table.getHeaderGroups().length}, auto)`,
40
40
  // gridTemplateColumns: `repeat(${table.getVisibleLeafColumns().length}, 1fr)`,
41
- gridTemplateColumns: `${table.getVisibleLeafColumns().map(n => `${n.getSize()}px`).join(" ")}`
41
+ gridTemplateColumns: `${table.getVisibleLeafColumns().map(n => `${n.getSize()}fr`).join(" ")}`
42
42
  }
43
43
  }, leafColumns.map(column => {
44
44
  const depth = column.depth ?? 0;
@@ -235,17 +235,18 @@ const TableHeadCell2 = props => {
235
235
  // rowSpan={rowSpan}
236
236
  ,
237
237
 
238
- key: header.id,
238
+ key: column.id,
239
239
  style: {
240
240
  // display: 'flex',
241
241
  // width: column.getSize(),
242
- minWidth: header.getSize(),
242
+ minWidth: column.getSize(),
243
243
  // flex: 1,
244
- flexGrow: header.getSize(),
244
+ // flexGrow: column.getSize(),
245
+
245
246
  gridRow: `${depth + 1} / span ${rowSpan}`,
246
247
  gridColumn: `span ${colSpan}`,
247
248
  // maxWidth: header.getSize(),
248
- ...(0, _utils.getCommonPinningStyles)(header.column),
249
+ ...(0, _utils.getCommonPinningStyles)(column),
249
250
  width: 'auto',
250
251
  ...style
251
252
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "es-grid-template",
3
- "version": "1.8.1",
3
+ "version": "1.8.21",
4
4
  "description": "es-grid-template",
5
5
  "keywords": [
6
6
  "react",