@lemon-fe/kits 1.0.0-38 → 1.0.0-39

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.
@@ -652,13 +652,20 @@ var DataGrid = /*#__PURE__*/function (_Component) {
652
652
  var result = map(columns);
653
653
  var rowSelection = this.props.rowSelection;
654
654
 
655
- if (rowSelection !== undefined && result.length > 0) {
656
- result[0] = _objectSpread(_objectSpread({
655
+ if (rowSelection !== undefined) {
656
+ result.unshift({
657
+ width: 32,
658
+ colId: '__selection__',
657
659
  checkboxSelection: true,
658
660
  showDisabledCheckboxes: true,
659
- headerCheckboxSelection: rowSelection.type !== 'radio'
660
- }, result[0]), {}, {
661
- headerComponent: HeaderRenderer
661
+ headerCheckboxSelection: rowSelection.type !== 'radio',
662
+ resizable: false,
663
+ sortable: false,
664
+ suppressAutoSize: true,
665
+ suppressMovable: true,
666
+ lockPinned: true,
667
+ lockVisible: true,
668
+ pinned: rowSelection.fixed
662
669
  });
663
670
  }
664
671
 
@@ -804,16 +811,13 @@ var DataGrid = /*#__PURE__*/function (_Component) {
804
811
 
805
812
  if (res.summary !== undefined && res.summary !== null) {
806
813
  pinned.push(res.summary);
807
- } // 重置滚动条
808
-
809
-
810
- var bean = _this6.api.__getContext().getBean('ctrlsService');
814
+ }
811
815
 
812
- bean.getGridBodyCtrl().getScrollFeature().scrollToTop();
816
+ _this6.updateRowData(res.data);
813
817
 
814
818
  _this6.api.setPinnedBottomRowData(pinned);
815
819
 
816
- _this6.updateRowData(res.data);
820
+ _this6.api.ensureIndexVisible(0);
817
821
 
818
822
  if (onLoad) {
819
823
  onLoad(res.extra);
@@ -58,8 +58,6 @@ export declare type RowSelectionType<T = any> = {
58
58
  selectedRowKeys?: string[];
59
59
  defaultSelectedRowKeys?: string[];
60
60
  fixed?: boolean;
61
- columnWidth?: number;
62
- preserveSelectedRowKeys?: boolean;
63
61
  onChange?: (selectedKeys: string[], selectedRows: T[]) => void;
64
62
  };
65
63
  export declare type PaginationType = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/kits",
3
- "version": "1.0.0-38",
3
+ "version": "1.0.0-39",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",