@meta-1/design 0.0.206 → 0.0.207

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meta-1/design",
3
- "version": "0.0.206",
3
+ "version": "0.0.207",
4
4
  "keywords": [
5
5
  "easykit",
6
6
  "design",
@@ -34,7 +34,7 @@ import {
34
34
  ValueFormatter,
35
35
  } from "@meta-1/design";
36
36
  import { UIXContext } from "@meta-1/design/components/uix/config-provider";
37
- import { LoadingOverlay, NoRowsOverlay } from "./overlays";
37
+ import { NoRowsOverlay } from "./overlays";
38
38
 
39
39
  import "./style.css";
40
40
 
@@ -410,7 +410,6 @@ export function DataGrid<TData>(props: DataGridProps<TData>) {
410
410
  // 注册自定义组件
411
411
  const components = useMemo(
412
412
  () => ({
413
- loadingOverlay: LoadingOverlay,
414
413
  noRowsOverlay: NoRowsOverlay,
415
414
  }),
416
415
  [],
@@ -524,12 +523,6 @@ export function DataGrid<TData>(props: DataGridProps<TData>) {
524
523
  [props],
525
524
  );
526
525
 
527
- // 根据 loading 状态控制覆盖层的显示
528
- useEffect(() => {
529
- if (!gridApiRef.current) return;
530
- gridApiRef.current.setGridOption("loading", loading || false);
531
- }, [loading]);
532
-
533
526
  const gridHeight = useMemo(() => {
534
527
  if (!maxHeight) return undefined;
535
528
  return typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight;
@@ -580,14 +573,13 @@ export function DataGrid<TData>(props: DataGridProps<TData>) {
580
573
  : undefined
581
574
  }
582
575
  getRowId={getRowId ? (params) => getRowId(params.data) : undefined}
583
- loadingOverlayComponent="loadingOverlay"
584
576
  noRowsOverlayComponent="noRowsOverlay"
585
577
  noRowsOverlayComponentParams={empty ? { noRowsMessage: empty } : undefined}
586
578
  onColumnVisible={onColumnVisible}
587
579
  onGridReady={onGridReady}
588
580
  onRowClicked={handleRowClick}
589
581
  onSelectionChanged={onSelectionChanged}
590
- rowData={loading ? [] : data}
582
+ rowData={data}
591
583
  rowHeight={autoRowHeight ? undefined : typeof rowHeight === "number" ? rowHeight : undefined}
592
584
  rowSelection={checkbox ? "multiple" : undefined}
593
585
  suppressAnimationFrame={false}