@canvas-components/react-list-table 0.2.5 → 0.2.7
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/dist/index.cjs +53 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +53 -44
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -3437,7 +3437,7 @@ function ReactTableToolbar(props) {
|
|
|
3437
3437
|
children: /* @__PURE__ */ jsxRuntime.jsx(ColumnHeightOutlined, {})
|
|
3438
3438
|
}
|
|
3439
3439
|
),
|
|
3440
|
-
densityOpen ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "react-list-table-tool-menu", children: [
|
|
3440
|
+
densityOpen ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "react-list-table-tool-menu", children: [56, 48, 32].map((height) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3441
3441
|
"button",
|
|
3442
3442
|
{
|
|
3443
3443
|
type: "button",
|
|
@@ -3446,7 +3446,7 @@ function ReactTableToolbar(props) {
|
|
|
3446
3446
|
props.onDensityChange(height);
|
|
3447
3447
|
setDensityOpen(false);
|
|
3448
3448
|
},
|
|
3449
|
-
children: height ===
|
|
3449
|
+
children: height === 56 ? "\u5BBD\u677E" : height === 48 ? "\u4E2D\u7B49" : "\u7D27\u51D1"
|
|
3450
3450
|
},
|
|
3451
3451
|
height
|
|
3452
3452
|
)) }) : null
|
|
@@ -3796,8 +3796,10 @@ function ReactListTableInner(props, ref) {
|
|
|
3796
3796
|
[columns, columnVisibility, columnOrders, columnConfig]
|
|
3797
3797
|
);
|
|
3798
3798
|
const resolvedRowHeight = densityOverride ?? rowHeight;
|
|
3799
|
-
const
|
|
3800
|
-
|
|
3799
|
+
const resolvedHeaderRowHeight = densityOverride ?? headerRowHeight;
|
|
3800
|
+
const resolvedSummaryRowHeight = densityOverride ?? summaryRowHeight;
|
|
3801
|
+
const options = react.useMemo(() => {
|
|
3802
|
+
const nextOptions = buildListTableOptions({
|
|
3801
3803
|
width,
|
|
3802
3804
|
height,
|
|
3803
3805
|
emptyText,
|
|
@@ -3814,8 +3816,8 @@ function ReactListTableInner(props, ref) {
|
|
|
3814
3816
|
contextMenu,
|
|
3815
3817
|
grouping,
|
|
3816
3818
|
rowHeight: resolvedRowHeight,
|
|
3817
|
-
headerRowHeight,
|
|
3818
|
-
summaryRowHeight,
|
|
3819
|
+
headerRowHeight: resolvedHeaderRowHeight,
|
|
3820
|
+
summaryRowHeight: resolvedSummaryRowHeight,
|
|
3819
3821
|
overscanRowCount,
|
|
3820
3822
|
query,
|
|
3821
3823
|
rowSelector,
|
|
@@ -3831,43 +3833,49 @@ function ReactListTableInner(props, ref) {
|
|
|
3831
3833
|
tableId,
|
|
3832
3834
|
rowDrag,
|
|
3833
3835
|
debug
|
|
3834
|
-
})
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3836
|
+
});
|
|
3837
|
+
return {
|
|
3838
|
+
...nextOptions,
|
|
3839
|
+
ui: {
|
|
3840
|
+
...nextOptions.ui,
|
|
3841
|
+
onDensityChange: setDensityOverride
|
|
3842
|
+
}
|
|
3843
|
+
};
|
|
3844
|
+
}, [
|
|
3845
|
+
width,
|
|
3846
|
+
height,
|
|
3847
|
+
emptyText,
|
|
3848
|
+
scroll,
|
|
3849
|
+
locale,
|
|
3850
|
+
onChange,
|
|
3851
|
+
rowKey,
|
|
3852
|
+
resolvedColumns,
|
|
3853
|
+
dataSource,
|
|
3854
|
+
onRow,
|
|
3855
|
+
theme,
|
|
3856
|
+
striped,
|
|
3857
|
+
highlightMode,
|
|
3858
|
+
contextMenu,
|
|
3859
|
+
grouping,
|
|
3860
|
+
resolvedRowHeight,
|
|
3861
|
+
resolvedHeaderRowHeight,
|
|
3862
|
+
resolvedSummaryRowHeight,
|
|
3863
|
+
overscanRowCount,
|
|
3864
|
+
query,
|
|
3865
|
+
rowSelector,
|
|
3866
|
+
rowSelection,
|
|
3867
|
+
expandable,
|
|
3868
|
+
pagination,
|
|
3869
|
+
scrollbar,
|
|
3870
|
+
carouselScroll,
|
|
3871
|
+
stretchColumns,
|
|
3872
|
+
resizable,
|
|
3873
|
+
storageKey,
|
|
3874
|
+
draggable,
|
|
3875
|
+
tableId,
|
|
3876
|
+
rowDrag,
|
|
3877
|
+
debug
|
|
3878
|
+
]);
|
|
3871
3879
|
const {
|
|
3872
3880
|
containerRef,
|
|
3873
3881
|
tableRef,
|
|
@@ -3924,10 +3932,11 @@ function ReactListTableInner(props, ref) {
|
|
|
3924
3932
|
title,
|
|
3925
3933
|
toolbar,
|
|
3926
3934
|
columns: resolvedColumns,
|
|
3927
|
-
density: resolvedRowHeight === "auto" ?
|
|
3935
|
+
density: resolvedRowHeight === "auto" ? 32 : resolvedRowHeight ?? 32,
|
|
3928
3936
|
hostRef: shellRef,
|
|
3929
3937
|
onExport: (options2) => tableRef.current?.exportXlsx(options2),
|
|
3930
3938
|
onDensityChange: (density) => {
|
|
3939
|
+
tableRef.current?.changeDensity(density);
|
|
3931
3940
|
setDensityOverride(density);
|
|
3932
3941
|
if (toolbar) {
|
|
3933
3942
|
toolbar.onDensityChange?.(density);
|