es-grid-template 1.9.43 → 1.9.44

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.
@@ -366,7 +366,7 @@ const EditableCell = props => {
366
366
  rowData: record,
367
367
  autoDestroy: true,
368
368
  onChange: (val, option) => {
369
- onChange(val ?? '');
369
+ onChange(val);
370
370
  const formState = getValues();
371
371
  // const itemState = getValues(dataIndex)
372
372
  // @ts-ignore
@@ -425,7 +425,7 @@ const EditableCell = props => {
425
425
  onBlur: event => {
426
426
  if (event.inputValue && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
427
427
  const val = event.inputValue;
428
- onChange(val ?? '');
428
+ onChange(val);
429
429
  const formState = getValues();
430
430
  // const itemState = getValues(dataIndex)
431
431
  // @ts-ignore
@@ -461,7 +461,7 @@ const EditableCell = props => {
461
461
  options: options,
462
462
  value: valueSelect ?? undefined,
463
463
  onChange: (val, option) => {
464
- onChange(val ?? '');
464
+ onChange(val);
465
465
  const formState = getValues();
466
466
  // const itemState = getValues(dataIndex)
467
467
  // @ts-ignore
@@ -504,7 +504,7 @@ const EditableCell = props => {
504
504
  onBlur: event => {
505
505
  if (event.inputValue && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
506
506
  const val = event.inputValue;
507
- onChange(val ?? '');
507
+ onChange(val);
508
508
  const formState = getValues();
509
509
  // const itemState = getValues(dataIndex)
510
510
  // @ts-ignore
@@ -541,7 +541,7 @@ const EditableCell = props => {
541
541
  defaultOptions: options,
542
542
  value: valueAsyncSelect ?? undefined,
543
543
  onChange: (val, option) => {
544
- onChange(val ?? '');
544
+ onChange(val);
545
545
  const formState = getValues();
546
546
  // const itemState = getValues(dataIndex)
547
547
  // @ts-ignore
@@ -623,7 +623,7 @@ const EditableCell = props => {
623
623
  onBlur: event => {
624
624
  if (event.inputValue && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
625
625
  const val = event.inputValue;
626
- onChange(val ?? '');
626
+ onChange(val);
627
627
  const formState = getValues();
628
628
  // const itemState = getValues(dataIndex)
629
629
  // @ts-ignore
@@ -706,7 +706,7 @@ const EditableCell = props => {
706
706
  filterTreeNode: filterTreeNode,
707
707
  popupMatchSelectWidth: menuWidth ? menuWidth + 10 : undefined,
708
708
  onSelect: (val, option) => {
709
- onChange(val ?? '');
709
+ onChange(val);
710
710
  const formState = getValues();
711
711
  // const itemState = getValues(dataIndex)
712
712
  // @ts-ignore
@@ -194,10 +194,10 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
194
194
  value: any;
195
195
  rowData: RecordType;
196
196
  }) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode);
197
- onCellStyles?: Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right">);
198
- onCellHeaderStyles?: Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right">);
197
+ onCellStyles?: Omit<CSSProperties, "width" | "left" | "right" | "display" | "minWidth" | "position"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "width" | "left" | "right" | "display" | "minWidth" | "position">);
198
+ onCellHeaderStyles?: Omit<CSSProperties, "width" | "left" | "right" | "display" | "minWidth" | "position"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "width" | "left" | "right" | "display" | "minWidth" | "position">);
199
199
  onCell?: (rowData: RecordType, index: number) => import("react").TdHTMLAttributes<HTMLTableCellElement>;
200
- onCellFooterStyles?: Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "position" | "display" | "width" | "minWidth" | "left" | "right">);
200
+ onCellFooterStyles?: Omit<CSSProperties, "width" | "left" | "right" | "display" | "minWidth" | "position"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "width" | "left" | "right" | "display" | "minWidth" | "position">);
201
201
  getValue?: (row: any, rowIndex: number) => any;
202
202
  getCellProps?: (value: any, row: any, rowIndex: number) => import("./../../grid-component/type").CellProps;
203
203
  headerCellProps?: import("./../../grid-component/type").CellProps;
@@ -1575,7 +1575,7 @@ const TableContainerEdit = props => {
1575
1575
  const toolbarItemsTop = React.useMemo(() => {
1576
1576
  // Chưa có dòng| ô được chọn
1577
1577
  if (!rowsFocus || rowsFocus.length === 0) {
1578
- return toolbarItems?.filter(it => it.position !== 'Bottom' && it.visible !== false && it.fixedRight !== false && it.key !== 'DUPLICATE' && it.key !== 'INSERT_BEFORE' && it.key !== 'INSERT_AFTER' && it.key !== 'DELETE_ROWS' && it.key !== 'INSERT_CHILDREN').map(item => {
1578
+ return toolbarItems?.filter(it => it.position !== 'Bottom' && it.visible !== false && it.fixedRight !== true && it.key !== 'DUPLICATE' && it.key !== 'INSERT_BEFORE' && it.key !== 'INSERT_AFTER' && it.key !== 'DELETE_ROWS' && it.key !== 'INSERT_CHILDREN').map(item => {
1579
1579
  if (item.key === 'ADD') {
1580
1580
  return {
1581
1581
  ...item,
@@ -1636,7 +1636,7 @@ const TableContainerEdit = props => {
1636
1636
  };
1637
1637
  });
1638
1638
  }
1639
- return toolbarItems?.filter(it => it.position !== 'Bottom' && it.visible !== false && it.fixedRight !== false).map(item => {
1639
+ return toolbarItems?.filter(it => it.position !== 'Bottom' && it.visible !== false && it.fixedRight !== true).map(item => {
1640
1640
  if (item.key === 'ADD') {
1641
1641
  return {
1642
1642
  ...item,
@@ -396,7 +396,7 @@ const EditableCell = props => {
396
396
  value: valueSelectTable ?? undefined,
397
397
  autoDestroy: true,
398
398
  onChange: (val, option) => {
399
- onChange(val ?? '');
399
+ onChange(val);
400
400
  const formState = getValues();
401
401
  // const itemState = getValues(dataIndex)
402
402
  // @ts-ignore
@@ -473,7 +473,7 @@ const EditableCell = props => {
473
473
  onBlur: event => {
474
474
  if (event.inputValue && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
475
475
  const val = event.inputValue;
476
- onChange(val ?? '');
476
+ onChange(val ?? undefined);
477
477
  const formState = getValues();
478
478
  // const itemState = getValues(dataIndex)
479
479
  // @ts-ignore
@@ -499,7 +499,7 @@ const EditableCell = props => {
499
499
  onKeyDown: event => {
500
500
  if (event.key === 'Enter' && event.target?.value && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
501
501
  const val = event.target.value;
502
- onChange(val ?? '');
502
+ onChange(val);
503
503
  const formState = getValues();
504
504
  // const itemState = getValues(dataIndex)
505
505
  // @ts-ignore
@@ -535,7 +535,7 @@ const EditableCell = props => {
535
535
  options: options,
536
536
  value: valueSelect ?? undefined,
537
537
  onChange: (val, option) => {
538
- onChange(val ?? '');
538
+ onChange(val);
539
539
  const formState = getValues();
540
540
  // const itemState = getValues(dataIndex)
541
541
  // @ts-ignore
@@ -586,7 +586,7 @@ const EditableCell = props => {
586
586
  onBlur: event => {
587
587
  if (event.inputValue && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
588
588
  const val = event.inputValue;
589
- onChange(val ?? '');
589
+ onChange(val);
590
590
  const formState = getValues();
591
591
  // const itemState = getValues(dataIndex)
592
592
  // @ts-ignore
@@ -612,7 +612,7 @@ const EditableCell = props => {
612
612
  onKeyDown: event => {
613
613
  if (event.key === 'Enter' && event.target?.value && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
614
614
  const val = event.target.value;
615
- onChange(val ?? '');
615
+ onChange(val);
616
616
  const formState = getValues();
617
617
  // const itemState = getValues(dataIndex)
618
618
  // @ts-ignore
@@ -673,7 +673,7 @@ const EditableCell = props => {
673
673
  defaultOptions: options,
674
674
  value: valueAsyncSelect ?? undefined,
675
675
  onChange: (val, option) => {
676
- onChange(val ?? '');
676
+ onChange(val);
677
677
  const formState = getValues();
678
678
  // const itemState = getValues(dataIndex)
679
679
  // @ts-ignore
@@ -749,7 +749,7 @@ const EditableCell = props => {
749
749
  onBlur: event => {
750
750
  if (event.inputValue && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
751
751
  const val = event.inputValue;
752
- onChange(val ?? '');
752
+ onChange(val);
753
753
  const formState = getValues();
754
754
  // const itemState = getValues(dataIndex)
755
755
  // @ts-ignore
@@ -813,7 +813,7 @@ const EditableCell = props => {
813
813
  filterTreeNode: filterTreeNode,
814
814
  popupMatchSelectWidth: menuWidth ? menuWidth + 10 : undefined,
815
815
  onSelect: (val, option) => {
816
- onChange(val ?? '');
816
+ onChange(val);
817
817
  const formState = getValues();
818
818
  // const itemState = getValues(dataIndex)
819
819
  // @ts-ignore
@@ -374,7 +374,7 @@ const EditableCell = props => {
374
374
  rowData: record,
375
375
  autoDestroy: true,
376
376
  onChange: (val, option) => {
377
- onChange(val ?? '');
377
+ onChange(val);
378
378
  const formState = getValues();
379
379
  // const itemState = getValues(dataIndex)
380
380
  // @ts-ignore
@@ -433,7 +433,7 @@ const EditableCell = props => {
433
433
  onBlur: event => {
434
434
  if (event.inputValue && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
435
435
  const val = event.inputValue;
436
- onChange(val ?? '');
436
+ onChange(val);
437
437
  const formState = getValues();
438
438
  // const itemState = getValues(dataIndex)
439
439
  // @ts-ignore
@@ -469,7 +469,7 @@ const EditableCell = props => {
469
469
  options: options,
470
470
  value: valueSelect ?? undefined,
471
471
  onChange: (val, option) => {
472
- onChange(val ?? '');
472
+ onChange(val);
473
473
  const formState = getValues();
474
474
  // const itemState = getValues(dataIndex)
475
475
  // @ts-ignore
@@ -512,7 +512,7 @@ const EditableCell = props => {
512
512
  onBlur: event => {
513
513
  if (event.inputValue && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
514
514
  const val = event.inputValue;
515
- onChange(val ?? '');
515
+ onChange(val);
516
516
  const formState = getValues();
517
517
  // const itemState = getValues(dataIndex)
518
518
  // @ts-ignore
@@ -549,7 +549,7 @@ const EditableCell = props => {
549
549
  defaultOptions: options,
550
550
  value: valueAsyncSelect ?? undefined,
551
551
  onChange: (val, option) => {
552
- onChange(val ?? '');
552
+ onChange(val);
553
553
  const formState = getValues();
554
554
  // const itemState = getValues(dataIndex)
555
555
  // @ts-ignore
@@ -631,7 +631,7 @@ const EditableCell = props => {
631
631
  onBlur: event => {
632
632
  if (event.inputValue && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
633
633
  const val = event.inputValue;
634
- onChange(val ?? '');
634
+ onChange(val);
635
635
  const formState = getValues();
636
636
  // const itemState = getValues(dataIndex)
637
637
  // @ts-ignore
@@ -714,7 +714,7 @@ const EditableCell = props => {
714
714
  filterTreeNode: filterTreeNode,
715
715
  popupMatchSelectWidth: menuWidth ? menuWidth + 10 : undefined,
716
716
  onSelect: (val, option) => {
717
- onChange(val ?? '');
717
+ onChange(val);
718
718
  const formState = getValues();
719
719
  // const itemState = getValues(dataIndex)
720
720
  // @ts-ignore
@@ -1576,7 +1576,7 @@ const TableContainerEdit = props => {
1576
1576
  const toolbarItemsTop = _react.default.useMemo(() => {
1577
1577
  // Chưa có dòng| ô được chọn
1578
1578
  if (!rowsFocus || rowsFocus.length === 0) {
1579
- return toolbarItems?.filter(it => it.position !== 'Bottom' && it.visible !== false && it.fixedRight !== false && it.key !== 'DUPLICATE' && it.key !== 'INSERT_BEFORE' && it.key !== 'INSERT_AFTER' && it.key !== 'DELETE_ROWS' && it.key !== 'INSERT_CHILDREN').map(item => {
1579
+ return toolbarItems?.filter(it => it.position !== 'Bottom' && it.visible !== false && it.fixedRight !== true && it.key !== 'DUPLICATE' && it.key !== 'INSERT_BEFORE' && it.key !== 'INSERT_AFTER' && it.key !== 'DELETE_ROWS' && it.key !== 'INSERT_CHILDREN').map(item => {
1580
1580
  if (item.key === 'ADD') {
1581
1581
  return {
1582
1582
  ...item,
@@ -1637,7 +1637,7 @@ const TableContainerEdit = props => {
1637
1637
  };
1638
1638
  });
1639
1639
  }
1640
- return toolbarItems?.filter(it => it.position !== 'Bottom' && it.visible !== false && it.fixedRight !== false).map(item => {
1640
+ return toolbarItems?.filter(it => it.position !== 'Bottom' && it.visible !== false && it.fixedRight !== true).map(item => {
1641
1641
  if (item.key === 'ADD') {
1642
1642
  return {
1643
1643
  ...item,
@@ -404,7 +404,7 @@ const EditableCell = props => {
404
404
  value: valueSelectTable ?? undefined,
405
405
  autoDestroy: true,
406
406
  onChange: (val, option) => {
407
- onChange(val ?? '');
407
+ onChange(val);
408
408
  const formState = getValues();
409
409
  // const itemState = getValues(dataIndex)
410
410
  // @ts-ignore
@@ -481,7 +481,7 @@ const EditableCell = props => {
481
481
  onBlur: event => {
482
482
  if (event.inputValue && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
483
483
  const val = event.inputValue;
484
- onChange(val ?? '');
484
+ onChange(val ?? undefined);
485
485
  const formState = getValues();
486
486
  // const itemState = getValues(dataIndex)
487
487
  // @ts-ignore
@@ -507,7 +507,7 @@ const EditableCell = props => {
507
507
  onKeyDown: event => {
508
508
  if (event.key === 'Enter' && event.target?.value && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
509
509
  const val = event.target.value;
510
- onChange(val ?? '');
510
+ onChange(val);
511
511
  const formState = getValues();
512
512
  // const itemState = getValues(dataIndex)
513
513
  // @ts-ignore
@@ -543,7 +543,7 @@ const EditableCell = props => {
543
543
  options: options,
544
544
  value: valueSelect ?? undefined,
545
545
  onChange: (val, option) => {
546
- onChange(val ?? '');
546
+ onChange(val);
547
547
  const formState = getValues();
548
548
  // const itemState = getValues(dataIndex)
549
549
  // @ts-ignore
@@ -594,7 +594,7 @@ const EditableCell = props => {
594
594
  onBlur: event => {
595
595
  if (event.inputValue && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
596
596
  const val = event.inputValue;
597
- onChange(val ?? '');
597
+ onChange(val);
598
598
  const formState = getValues();
599
599
  // const itemState = getValues(dataIndex)
600
600
  // @ts-ignore
@@ -620,7 +620,7 @@ const EditableCell = props => {
620
620
  onKeyDown: event => {
621
621
  if (event.key === 'Enter' && event.target?.value && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
622
622
  const val = event.target.value;
623
- onChange(val ?? '');
623
+ onChange(val);
624
624
  const formState = getValues();
625
625
  // const itemState = getValues(dataIndex)
626
626
  // @ts-ignore
@@ -681,7 +681,7 @@ const EditableCell = props => {
681
681
  defaultOptions: options,
682
682
  value: valueAsyncSelect ?? undefined,
683
683
  onChange: (val, option) => {
684
- onChange(val ?? '');
684
+ onChange(val);
685
685
  const formState = getValues();
686
686
  // const itemState = getValues(dataIndex)
687
687
  // @ts-ignore
@@ -757,7 +757,7 @@ const EditableCell = props => {
757
757
  onBlur: event => {
758
758
  if (event.inputValue && column?.editSelectSettings?.searchTextAsValue && isMulti !== true) {
759
759
  const val = event.inputValue;
760
- onChange(val ?? '');
760
+ onChange(val);
761
761
  const formState = getValues();
762
762
  // const itemState = getValues(dataIndex)
763
763
  // @ts-ignore
@@ -821,7 +821,7 @@ const EditableCell = props => {
821
821
  filterTreeNode: filterTreeNode,
822
822
  popupMatchSelectWidth: menuWidth ? menuWidth + 10 : undefined,
823
823
  onSelect: (val, option) => {
824
- onChange(val ?? '');
824
+ onChange(val);
825
825
  const formState = getValues();
826
826
  // const itemState = getValues(dataIndex)
827
827
  // @ts-ignore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "es-grid-template",
3
- "version": "1.9.43",
3
+ "version": "1.9.44",
4
4
  "description": "es-grid-template",
5
5
  "keywords": [
6
6
  "react",