@etsoo/materialui 1.4.47 → 1.4.48

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.
@@ -8,7 +8,7 @@ globalThis.ResizeObserver = vi.fn().mockImplementation(() => ({
8
8
  disconnect: vi.fn()
9
9
  }));
10
10
 
11
- type Data = { id: number; name: string };
11
+ type Data = { id: number; name: string; value?: string };
12
12
 
13
13
  // Timer mock
14
14
  // https://jestjs.io/docs/en/timer-mocks
@@ -28,7 +28,12 @@ it("Render ResponsePage", async () => {
28
28
  fields={[]}
29
29
  columns={[
30
30
  { field: "id", header: "ID" },
31
- { field: "name", header: "Name" }
31
+ { field: "name", header: "Name" },
32
+ {
33
+ field: "value",
34
+ header: "Value",
35
+ valueFormatter: ({ data }) => data?.value ?? data?.name
36
+ }
32
37
  ]}
33
38
  height={200}
34
39
  itemSize={[118, MUGlobal.pagePaddings]}
@@ -2,8 +2,9 @@ import type { DataGridExProps } from "../DataGridEx";
2
2
  import type { SearchPageProps } from "./SearchPageProps";
3
3
  /**
4
4
  * DataGrid page props
5
+ * Change it to interface extends can find the conflicts quickly
5
6
  */
6
- export type DataGridPageProps<T extends object, F> = SearchPageProps<T, F> & Omit<DataGridExProps<T>, "loadData"> & {
7
+ export type DataGridPageProps<T extends object, F> = SearchPageProps<T, F> & Omit<DataGridExProps<T>, "loadData" | "cacheKey" | "cacheMinutes" | "height"> & {
7
8
  /**
8
9
  * Height will be deducted
9
10
  * @param height Current calcuated height
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.4.47",
3
+ "version": "1.4.48",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",
@@ -3,9 +3,13 @@ import type { SearchPageProps } from "./SearchPageProps";
3
3
 
4
4
  /**
5
5
  * DataGrid page props
6
+ * Change it to interface extends can find the conflicts quickly
6
7
  */
7
8
  export type DataGridPageProps<T extends object, F> = SearchPageProps<T, F> &
8
- Omit<DataGridExProps<T>, "loadData"> & {
9
+ Omit<
10
+ DataGridExProps<T>,
11
+ "loadData" | "cacheKey" | "cacheMinutes" | "height"
12
+ > & {
9
13
  /**
10
14
  * Height will be deducted
11
15
  * @param height Current calcuated height