@tidbcloud/uikit 2.0.0-beta.39 → 2.0.0-beta.40
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/CHANGELOG.md
CHANGED
|
@@ -27,6 +27,7 @@ const ProTable = ({
|
|
|
27
27
|
data,
|
|
28
28
|
localization,
|
|
29
29
|
state,
|
|
30
|
+
initialState,
|
|
30
31
|
...rest
|
|
31
32
|
}) => {
|
|
32
33
|
const theme = MantineProvider.useMantineTheme();
|
|
@@ -48,6 +49,7 @@ const ProTable = ({
|
|
|
48
49
|
},
|
|
49
50
|
mantinePaperProps
|
|
50
51
|
);
|
|
52
|
+
const pinned = initialState && !!initialState.columnPinning;
|
|
51
53
|
const mTableProps = helpers.mergeMProps(
|
|
52
54
|
{
|
|
53
55
|
highlightOnHover: true,
|
|
@@ -91,7 +93,7 @@ const ProTable = ({
|
|
|
91
93
|
const mTableContainerProps = helpers.mergeMProps(
|
|
92
94
|
() => ({
|
|
93
95
|
sx: {
|
|
94
|
-
overflow: "unset"
|
|
96
|
+
overflow: pinned ? "auto" : "unset"
|
|
95
97
|
}
|
|
96
98
|
}),
|
|
97
99
|
mantineTableContainerProps
|
|
@@ -153,6 +155,7 @@ const ProTable = ({
|
|
|
153
155
|
IconSortAscending: () => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(index.IconArrowUp, { size: 14 }),
|
|
154
156
|
IconSortDescending: () => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(index.IconArrowDown, { size: 14 })
|
|
155
157
|
},
|
|
158
|
+
initialState,
|
|
156
159
|
state: { isLoading: loading, ...state },
|
|
157
160
|
...rest
|
|
158
161
|
}
|
|
@@ -10,4 +10,4 @@ export interface ProTableProps<TData extends Record<string, any> = {}> extends M
|
|
|
10
10
|
pagination?: TablePaginationProps;
|
|
11
11
|
wrapperProps?: BoxProps;
|
|
12
12
|
}
|
|
13
|
-
export declare const ProTable: <T extends Record<string, any> = {}>({ mantineTableProps, mantinePaperProps, mantineTableContainerProps, mantineTableBodyProps, mantineTableBodyCellProps, mantineBottomToolbarProps, wrapperProps, pagination, withBorder, loading, enableStickyHeader, enablePagination, enableBottomToolbar, enableSorting, emptyMessage, errorMessage, data, localization, state, ...rest }: ProTableProps<T>) => import("react/jsx-runtime.js").JSX.Element;
|
|
13
|
+
export declare const ProTable: <T extends Record<string, any> = {}>({ mantineTableProps, mantinePaperProps, mantineTableContainerProps, mantineTableBodyProps, mantineTableBodyCellProps, mantineBottomToolbarProps, wrapperProps, pagination, withBorder, loading, enableStickyHeader, enablePagination, enableBottomToolbar, enableSorting, emptyMessage, errorMessage, data, localization, state, initialState, ...rest }: ProTableProps<T>) => import("react/jsx-runtime.js").JSX.Element;
|
|
@@ -10,4 +10,4 @@ export interface ProTableProps<TData extends Record<string, any> = {}> extends M
|
|
|
10
10
|
pagination?: TablePaginationProps;
|
|
11
11
|
wrapperProps?: BoxProps;
|
|
12
12
|
}
|
|
13
|
-
export declare const ProTable: <T extends Record<string, any> = {}>({ mantineTableProps, mantinePaperProps, mantineTableContainerProps, mantineTableBodyProps, mantineTableBodyCellProps, mantineBottomToolbarProps, wrapperProps, pagination, withBorder, loading, enableStickyHeader, enablePagination, enableBottomToolbar, enableSorting, emptyMessage, errorMessage, data, localization, state, ...rest }: ProTableProps<T>) => import("react/jsx-runtime.js").JSX.Element;
|
|
13
|
+
export declare const ProTable: <T extends Record<string, any> = {}>({ mantineTableProps, mantinePaperProps, mantineTableContainerProps, mantineTableBodyProps, mantineTableBodyCellProps, mantineBottomToolbarProps, wrapperProps, pagination, withBorder, loading, enableStickyHeader, enablePagination, enableBottomToolbar, enableSorting, emptyMessage, errorMessage, data, localization, state, initialState, ...rest }: ProTableProps<T>) => import("react/jsx-runtime.js").JSX.Element;
|
|
@@ -25,6 +25,7 @@ const ProTable = ({
|
|
|
25
25
|
data,
|
|
26
26
|
localization,
|
|
27
27
|
state,
|
|
28
|
+
initialState,
|
|
28
29
|
...rest
|
|
29
30
|
}) => {
|
|
30
31
|
const theme = useMantineTheme();
|
|
@@ -46,6 +47,7 @@ const ProTable = ({
|
|
|
46
47
|
},
|
|
47
48
|
mantinePaperProps
|
|
48
49
|
);
|
|
50
|
+
const pinned = initialState && !!initialState.columnPinning;
|
|
49
51
|
const mTableProps = mergeMProps(
|
|
50
52
|
{
|
|
51
53
|
highlightOnHover: true,
|
|
@@ -89,7 +91,7 @@ const ProTable = ({
|
|
|
89
91
|
const mTableContainerProps = mergeMProps(
|
|
90
92
|
() => ({
|
|
91
93
|
sx: {
|
|
92
|
-
overflow: "unset"
|
|
94
|
+
overflow: pinned ? "auto" : "unset"
|
|
93
95
|
}
|
|
94
96
|
}),
|
|
95
97
|
mantineTableContainerProps
|
|
@@ -151,6 +153,7 @@ const ProTable = ({
|
|
|
151
153
|
IconSortAscending: () => /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowUp, { size: 14 }),
|
|
152
154
|
IconSortDescending: () => /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowDown, { size: 14 })
|
|
153
155
|
},
|
|
156
|
+
initialState,
|
|
154
157
|
state: { isLoading: loading, ...state },
|
|
155
158
|
...rest
|
|
156
159
|
}
|