@canvas-components/react-list-table 0.3.6 → 0.3.8
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 +38 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +38 -20
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -36,8 +36,8 @@ interface ReactListTableToolbarOptions {
|
|
|
36
36
|
/** 默认导出行为使用的文件名和汇总行配置。 */
|
|
37
37
|
exportOptions?: ListTableExportXlsxOptions;
|
|
38
38
|
onRefresh?: () => void;
|
|
39
|
-
/**
|
|
40
|
-
onDensityChange?: (density: 32 | 48 | 56) => void;
|
|
39
|
+
/** 表格密度变化回调,依次对应超紧凑、紧凑、中等和宽松。 */
|
|
40
|
+
onDensityChange?: (density: 26 | 32 | 48 | 56) => void;
|
|
41
41
|
/** 自定义导出行为;未配置时默认异步导出全量 XLSX 数据。 */
|
|
42
42
|
onExport?: () => void;
|
|
43
43
|
/** 自定义全屏节点,默认使用表格根容器。 */
|
package/dist/index.d.ts
CHANGED
|
@@ -36,8 +36,8 @@ interface ReactListTableToolbarOptions {
|
|
|
36
36
|
/** 默认导出行为使用的文件名和汇总行配置。 */
|
|
37
37
|
exportOptions?: ListTableExportXlsxOptions;
|
|
38
38
|
onRefresh?: () => void;
|
|
39
|
-
/**
|
|
40
|
-
onDensityChange?: (density: 32 | 48 | 56) => void;
|
|
39
|
+
/** 表格密度变化回调,依次对应超紧凑、紧凑、中等和宽松。 */
|
|
40
|
+
onDensityChange?: (density: 26 | 32 | 48 | 56) => void;
|
|
41
41
|
/** 自定义导出行为;未配置时默认异步导出全量 XLSX 数据。 */
|
|
42
42
|
onExport?: () => void;
|
|
43
43
|
/** 自定义全屏节点,默认使用表格根容器。 */
|
package/dist/index.js
CHANGED
|
@@ -587,6 +587,14 @@ function DensityMenu(props) {
|
|
|
587
587
|
onChange("compact");
|
|
588
588
|
}
|
|
589
589
|
},
|
|
590
|
+
{
|
|
591
|
+
key: "density-ultra-compact",
|
|
592
|
+
label: "\u8D85\u7D27\u51D1",
|
|
593
|
+
selected: value === "ultra-compact",
|
|
594
|
+
onClick: () => {
|
|
595
|
+
onChange("ultra-compact");
|
|
596
|
+
}
|
|
597
|
+
},
|
|
590
598
|
{
|
|
591
599
|
key: "density-auto",
|
|
592
600
|
label: "\u81EA\u9002\u5E94",
|
|
@@ -665,7 +673,7 @@ function ZoomMenu(props) {
|
|
|
665
673
|
alignItems: "center",
|
|
666
674
|
gap: 8,
|
|
667
675
|
color: "#6b7280",
|
|
668
|
-
fontSize:
|
|
676
|
+
fontSize: 14
|
|
669
677
|
},
|
|
670
678
|
children: [
|
|
671
679
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -719,7 +727,7 @@ function ZoomMenu(props) {
|
|
|
719
727
|
{
|
|
720
728
|
style: {
|
|
721
729
|
color: "#6b7280",
|
|
722
|
-
fontSize:
|
|
730
|
+
fontSize: 14,
|
|
723
731
|
padding: "0 8px"
|
|
724
732
|
},
|
|
725
733
|
children: "\u8868\u683C\u7F29\u653E\uFF0850% - 200%\uFF09"
|
|
@@ -858,6 +866,7 @@ function ColumnVisibilityMenu(props) {
|
|
|
858
866
|
offset: 2,
|
|
859
867
|
minWidth: 220,
|
|
860
868
|
onOpenChange: setOpen,
|
|
869
|
+
surfaceClassName: "canvas-react-scrollbar",
|
|
861
870
|
surfaceStyle: {
|
|
862
871
|
...CONTEXT_MENU_SURFACE_STYLE,
|
|
863
872
|
maxHeight: 360,
|
|
@@ -963,6 +972,7 @@ function ColumnVisibilityItem(props) {
|
|
|
963
972
|
offset: 2,
|
|
964
973
|
minWidth: 220,
|
|
965
974
|
onOpenChange: setOpen,
|
|
975
|
+
surfaceClassName: "canvas-react-scrollbar",
|
|
966
976
|
surfaceStyle: {
|
|
967
977
|
...CONTEXT_MENU_SURFACE_STYLE,
|
|
968
978
|
maxHeight: 320,
|
|
@@ -1066,7 +1076,7 @@ function CustomSelectionDialog(props) {
|
|
|
1066
1076
|
},
|
|
1067
1077
|
bodyStyle: { padding: "4px 20px 18px" },
|
|
1068
1078
|
children: [
|
|
1069
|
-
/* @__PURE__ */ jsx("div", { style: { color: "#6b7280", fontSize:
|
|
1079
|
+
/* @__PURE__ */ jsx("div", { style: { color: "#6b7280", fontSize: 14, marginBottom: 10 }, children: "\u8F93\u5165\u8D77\u59CB\u4F4D\u7F6E\u548C\u7ED3\u675F\u4F4D\u7F6E" }),
|
|
1070
1080
|
/* @__PURE__ */ jsxs(
|
|
1071
1081
|
"div",
|
|
1072
1082
|
{
|
|
@@ -1076,7 +1086,7 @@ function CustomSelectionDialog(props) {
|
|
|
1076
1086
|
gap: 8,
|
|
1077
1087
|
marginBottom: 6,
|
|
1078
1088
|
color: "#6b7280",
|
|
1079
|
-
fontSize:
|
|
1089
|
+
fontSize: 14,
|
|
1080
1090
|
textAlign: "center"
|
|
1081
1091
|
},
|
|
1082
1092
|
children: [
|
|
@@ -1122,7 +1132,7 @@ function CustomSelectionRow(props) {
|
|
|
1122
1132
|
marginBottom: 6
|
|
1123
1133
|
},
|
|
1124
1134
|
children: [
|
|
1125
|
-
/* @__PURE__ */ jsx("span", { style: { color: "#374151", fontSize:
|
|
1135
|
+
/* @__PURE__ */ jsx("span", { style: { color: "#374151", fontSize: 14 }, children: props.label }),
|
|
1126
1136
|
/* @__PURE__ */ jsx(
|
|
1127
1137
|
ReactInputNumber,
|
|
1128
1138
|
{
|
|
@@ -1210,7 +1220,7 @@ function SummaryMenu(props) {
|
|
|
1210
1220
|
},
|
|
1211
1221
|
children: [
|
|
1212
1222
|
request.onChangeSummaryPrecision ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1213
|
-
/* @__PURE__ */ jsx("span", { style: { color: "#374151", fontSize:
|
|
1223
|
+
/* @__PURE__ */ jsx("span", { style: { color: "#374151", fontSize: 14 }, children: "\u5C0F\u6570\u4F4D\u6570" }),
|
|
1214
1224
|
/* @__PURE__ */ jsx(
|
|
1215
1225
|
ReactInputNumber,
|
|
1216
1226
|
{
|
|
@@ -1228,7 +1238,7 @@ function SummaryMenu(props) {
|
|
|
1228
1238
|
)
|
|
1229
1239
|
] }) : null,
|
|
1230
1240
|
request.onChangeSummaryRoundingMode ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1231
|
-
/* @__PURE__ */ jsx("span", { style: { color: "#374151", fontSize:
|
|
1241
|
+
/* @__PURE__ */ jsx("span", { style: { color: "#374151", fontSize: 14 }, children: "\u53D6\u6574\u65B9\u5F0F" }),
|
|
1232
1242
|
/* @__PURE__ */ jsx(
|
|
1233
1243
|
ReactSelect,
|
|
1234
1244
|
{
|
|
@@ -1248,7 +1258,7 @@ function SummaryMenu(props) {
|
|
|
1248
1258
|
)
|
|
1249
1259
|
] }) : null,
|
|
1250
1260
|
request.onChangeSummaryPreserveTrailingZeros ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1251
|
-
/* @__PURE__ */ jsx("span", { style: { color: "#374151", fontSize:
|
|
1261
|
+
/* @__PURE__ */ jsx("span", { style: { color: "#374151", fontSize: 14 }, children: "\u4FDD\u7559\u65E0\u6548\u96F6" }),
|
|
1252
1262
|
/* @__PURE__ */ jsx(
|
|
1253
1263
|
ReactSelect,
|
|
1254
1264
|
{
|
|
@@ -1308,7 +1318,7 @@ function AlignmentMenu(props) {
|
|
|
1308
1318
|
}
|
|
1309
1319
|
function AlignmentGroup(props) {
|
|
1310
1320
|
return /* @__PURE__ */ jsxs("div", { style: { display: "grid", gap: 6 }, children: [
|
|
1311
|
-
/* @__PURE__ */ jsx("strong", { style: { color: "#374151", fontSize:
|
|
1321
|
+
/* @__PURE__ */ jsx("strong", { style: { color: "#374151", fontSize: 14 }, children: props.label }),
|
|
1312
1322
|
/* @__PURE__ */ jsx(
|
|
1313
1323
|
AlignmentSegment,
|
|
1314
1324
|
{
|
|
@@ -1348,7 +1358,7 @@ function AlignmentSegment(props) {
|
|
|
1348
1358
|
alignItems: "center"
|
|
1349
1359
|
},
|
|
1350
1360
|
children: [
|
|
1351
|
-
/* @__PURE__ */ jsx("span", { style: { color: "#6b7280", fontSize:
|
|
1361
|
+
/* @__PURE__ */ jsx("span", { style: { color: "#6b7280", fontSize: 14 }, children: props.label }),
|
|
1352
1362
|
props.options.map((option) => /* @__PURE__ */ jsx(
|
|
1353
1363
|
"button",
|
|
1354
1364
|
{
|
|
@@ -1793,7 +1803,7 @@ function FormatChoiceList(props) {
|
|
|
1793
1803
|
children: props.label
|
|
1794
1804
|
}
|
|
1795
1805
|
),
|
|
1796
|
-
/* @__PURE__ */ jsx("div", { style: moreFormatChoiceListStyle, children: props.options.map((option) => {
|
|
1806
|
+
/* @__PURE__ */ jsx("div", { className: "canvas-react-scrollbar", style: moreFormatChoiceListStyle, children: props.options.map((option) => {
|
|
1797
1807
|
const value = typeof option === "string" ? option : option.value;
|
|
1798
1808
|
const label = typeof option === "string" ? option : option.label;
|
|
1799
1809
|
return /* @__PURE__ */ jsx(
|
|
@@ -2001,7 +2011,7 @@ function resolveMoreFormatSample(category, customPattern, decimalPlaces = 2, cur
|
|
|
2001
2011
|
var moreFormatLabelStyle = {
|
|
2002
2012
|
marginBottom: 6,
|
|
2003
2013
|
color: "#4b5563",
|
|
2004
|
-
fontSize:
|
|
2014
|
+
fontSize: 14
|
|
2005
2015
|
};
|
|
2006
2016
|
var moreFormatCategoryListStyle = {
|
|
2007
2017
|
display: "grid",
|
|
@@ -2036,7 +2046,7 @@ var moreFormatExampleStyle = {
|
|
|
2036
2046
|
};
|
|
2037
2047
|
var moreFormatDescriptionStyle = {
|
|
2038
2048
|
color: "#6b7280",
|
|
2039
|
-
fontSize:
|
|
2049
|
+
fontSize: 14
|
|
2040
2050
|
};
|
|
2041
2051
|
var moreFormatOptionsStyle = {
|
|
2042
2052
|
display: "flex",
|
|
@@ -2155,7 +2165,7 @@ var searchContentStyle = {
|
|
|
2155
2165
|
var matchTextStyle = {
|
|
2156
2166
|
minWidth: 58,
|
|
2157
2167
|
color: "#64748b",
|
|
2158
|
-
fontSize:
|
|
2168
|
+
fontSize: 14,
|
|
2159
2169
|
whiteSpace: "nowrap"
|
|
2160
2170
|
};
|
|
2161
2171
|
var toolButtonStyle = {
|
|
@@ -3122,7 +3132,7 @@ function ReactTableTooltipView(props) {
|
|
|
3122
3132
|
return null;
|
|
3123
3133
|
}
|
|
3124
3134
|
const zoom = typeof request.contentZoom === "number" && Number.isFinite(request.contentZoom) && request.contentZoom > 0 ? request.contentZoom : 1;
|
|
3125
|
-
const fontSize =
|
|
3135
|
+
const fontSize = 14 * zoom;
|
|
3126
3136
|
const paddingBlock = 6 * zoom;
|
|
3127
3137
|
const paddingInline = 10 * zoom;
|
|
3128
3138
|
const borderRadius = 6 * zoom;
|
|
@@ -3364,7 +3374,7 @@ function resolveSortableTransform(index, sourceIndex, targetIndex, height) {
|
|
|
3364
3374
|
}
|
|
3365
3375
|
|
|
3366
3376
|
// src/features/toolbar/style.css
|
|
3367
|
-
styleInject('.react-list-table-shell {\n background: #fff;\n}\n.react-list-table-titlebar {\n height: 44px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 0;\n box-sizing: border-box;\n background: #fff;\n}\n.react-list-table-shell-fullscreen {\n width: 100% !important;\n height: 100% !important;\n}\n.react-list-table-shell-fullscreen .canvas-list-table-root {\n height: 100% !important;\n}\n.react-list-table-title {\n min-width: 0;\n color: #1f2937;\n font-size: 14px;\n font-weight: 600;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.react-list-table-tools {\n display: flex;\n align-items: center;\n gap: 14px;\n color: #475569;\n}\n.react-list-table-tool-wrap {\n position: relative;\n display: inline-flex;\n}\n.react-list-table-tool {\n width: 20px;\n height: 24px;\n padding: 0;\n border: 0;\n color: inherit;\n background: transparent;\n font: 16px/24px sans-serif;\n cursor: pointer;\n}\n.react-list-table-tool:hover {\n color: #1677ff;\n}\n.react-list-table-tool-menu,\n.react-list-table-column-setting {\n position: absolute;\n z-index: 120;\n top: 28px;\n right: 0;\n min-width: 112px;\n padding: 6px;\n border: 1px solid #e5e7eb;\n border-radius: 6px;\n background: #fff;\n box-shadow: 0 8px 24px rgba(15, 23, 42, .14);\n}\n.react-list-table-tool-menu button {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 6px 10px;\n border: 0;\n border-radius: 4px;\n background: transparent;\n text-align: left;\n cursor: pointer;\n}\n.react-list-table-tool-menu button.active::after {\n content: "\\2713";\n margin-left: 12px;\n font-size:
|
|
3377
|
+
styleInject('.react-list-table-shell {\n background: #fff;\n font-size: 14px;\n}\n.react-list-table-titlebar {\n height: 44px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 0;\n box-sizing: border-box;\n background: #fff;\n}\n.react-list-table-shell-fullscreen {\n width: 100% !important;\n height: 100% !important;\n}\n.react-list-table-shell-fullscreen .canvas-list-table-root {\n height: 100% !important;\n}\n.react-list-table-title {\n min-width: 0;\n color: #1f2937;\n font-size: 14px;\n font-weight: 600;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.react-list-table-tools {\n display: flex;\n align-items: center;\n gap: 14px;\n color: #475569;\n}\n.react-list-table-tool-wrap {\n position: relative;\n display: inline-flex;\n}\n.react-list-table-tool {\n width: 20px;\n height: 24px;\n padding: 0;\n border: 0;\n color: inherit;\n background: transparent;\n font: 16px/24px sans-serif;\n cursor: pointer;\n}\n.react-list-table-tool:hover {\n color: #1677ff;\n}\n.react-list-table-tool-menu,\n.react-list-table-column-setting {\n position: absolute;\n z-index: 120;\n top: 28px;\n right: 0;\n min-width: 112px;\n padding: 6px;\n border: 1px solid #e5e7eb;\n border-radius: 6px;\n background: #fff;\n box-shadow: 0 8px 24px rgba(15, 23, 42, .14);\n}\n.react-list-table-tool-menu button {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 6px 10px;\n border: 0;\n border-radius: 4px;\n background: transparent;\n text-align: left;\n cursor: pointer;\n}\n.react-list-table-tool-menu button.active::after {\n content: "\\2713";\n margin-left: 12px;\n font-size: 14px;\n}\n.react-list-table-tool-menu button:hover,\n.react-list-table-tool-menu button.active {\n color: #1677ff;\n background: #e6f4ff;\n}\n.react-list-table-column-setting {\n width: 328px;\n max-height: 360px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n.react-list-table-column-setting-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 4px 6px 8px;\n border-bottom: 1px solid #f0f0f0;\n flex: 0 0 auto;\n}\n.react-list-table-column-setting-head button {\n border: 0;\n color: #1677ff;\n background: transparent;\n cursor: pointer;\n}\n.react-list-table-column-setting-body {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n}\n.react-list-table-column-item {\n display: flex;\n align-items: center;\n gap: 8px;\n justify-content: space-between;\n padding: 7px 6px;\n box-sizing: border-box;\n cursor: pointer;\n}\n.react-list-table-column-main,\n.react-list-table-column-actions {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n}\n.react-list-table-column-main {\n min-width: 0;\n}\n.react-list-table-column-actions {\n flex: 0 0 auto;\n}\n.react-list-table-column-actions > .canvas-react-select-wrap {\n flex: 0 0 96px;\n width: 96px;\n height: 24px;\n}\n.react-list-table-column-label {\n min-width: 64px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.react-list-table-column-width-input {\n height: 22px;\n padding-inline: 5px;\n}\n.react-list-table-column-fixed-input {\n height: 22px;\n padding-inline: 6px;\n font-size: 14px;\n}\n.react-list-table-column-setting label.dragging {\n opacity: 0.45;\n background: #e6f4ff;\n}\n.react-list-table-column-setting [data-sortable-key].dragging {\n opacity: 0.28;\n}\n.react-list-table-column-drag {\n color: #94a3b8;\n display: inline-flex;\n font-size: 14px;\n cursor: grab;\n user-select: none;\n}\nbody.react-list-table-sorting,\nbody.react-list-table-sorting * {\n cursor: grabbing !important;\n}\n.react-list-table-sort-overlay {\n position: fixed;\n z-index: 1400;\n display: block;\n padding: 0;\n box-sizing: border-box;\n color: #334155;\n background: #fff;\n border: 1px solid #91caff;\n border-radius: 6px;\n box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);\n pointer-events: none;\n}\n.react-list-table-sort-overlay .react-list-table-column-item {\n width: 100%;\n height: 100%;\n}\n');
|
|
3368
3378
|
function ReactTableToolbar(props) {
|
|
3369
3379
|
const { toolbar, title } = props;
|
|
3370
3380
|
const [densityOpen, setDensityOpen] = useState(false);
|
|
@@ -3450,7 +3460,7 @@ function ReactTableToolbar(props) {
|
|
|
3450
3460
|
children: /* @__PURE__ */ jsx(ColumnHeightOutlined, {})
|
|
3451
3461
|
}
|
|
3452
3462
|
),
|
|
3453
|
-
densityOpen ? /* @__PURE__ */ jsx("div", { className: "react-list-table-tool-menu", children: [56, 48, 32].map((height) => /* @__PURE__ */ jsx(
|
|
3463
|
+
densityOpen ? /* @__PURE__ */ jsx("div", { className: "react-list-table-tool-menu", children: [56, 48, 32, 26].map((height) => /* @__PURE__ */ jsx(
|
|
3454
3464
|
"button",
|
|
3455
3465
|
{
|
|
3456
3466
|
type: "button",
|
|
@@ -3459,7 +3469,7 @@ function ReactTableToolbar(props) {
|
|
|
3459
3469
|
props.onDensityChange(height);
|
|
3460
3470
|
setDensityOpen(false);
|
|
3461
3471
|
},
|
|
3462
|
-
children: height === 56 ? "\u5BBD\u677E" : height === 48 ? "\u4E2D\u7B49" : "\u7D27\u51D1"
|
|
3472
|
+
children: height === 56 ? "\u5BBD\u677E" : height === 48 ? "\u4E2D\u7B49" : height === 32 ? "\u7D27\u51D1" : "\u8D85\u7D27\u51D1"
|
|
3463
3473
|
},
|
|
3464
3474
|
height
|
|
3465
3475
|
)) }) : null
|
|
@@ -3484,7 +3494,7 @@ function ReactTableToolbar(props) {
|
|
|
3484
3494
|
/* @__PURE__ */ jsx("span", { style: { marginLeft: "auto" }, children: config.columnSettingHeaderExtra }),
|
|
3485
3495
|
/* @__PURE__ */ jsx("button", { type: "button", onClick: props.onResetColumns, children: "\u91CD\u7F6E" })
|
|
3486
3496
|
] }),
|
|
3487
|
-
/* @__PURE__ */ jsx("div", { className: "react-list-table-column-setting-body", children: /* @__PURE__ */ jsx(
|
|
3497
|
+
/* @__PURE__ */ jsx("div", { className: "react-list-table-column-setting-body canvas-react-scrollbar", children: /* @__PURE__ */ jsx(
|
|
3488
3498
|
SortableList,
|
|
3489
3499
|
{
|
|
3490
3500
|
items: flattenColumns(props.columns),
|
|
@@ -3805,6 +3815,7 @@ function ReactListTableInner(props, ref) {
|
|
|
3805
3815
|
() => /* @__PURE__ */ new Map()
|
|
3806
3816
|
);
|
|
3807
3817
|
const [columnConfig, setColumnConfig] = useState(() => /* @__PURE__ */ new Map());
|
|
3818
|
+
const [columnConfigRevision, setColumnConfigRevision] = useState(0);
|
|
3808
3819
|
const resolvedColumns = useMemo(
|
|
3809
3820
|
() => applyColumnManagerState(
|
|
3810
3821
|
columns,
|
|
@@ -3867,6 +3878,7 @@ function ReactListTableInner(props, ref) {
|
|
|
3867
3878
|
return {
|
|
3868
3879
|
...nextOptions,
|
|
3869
3880
|
...fullscreenSize,
|
|
3881
|
+
columnConfigRevision,
|
|
3870
3882
|
ui: {
|
|
3871
3883
|
...nextOptions.ui,
|
|
3872
3884
|
onDensityChange: setDensityOverride
|
|
@@ -3906,7 +3918,8 @@ function ReactListTableInner(props, ref) {
|
|
|
3906
3918
|
tableId,
|
|
3907
3919
|
rowDrag,
|
|
3908
3920
|
debug,
|
|
3909
|
-
isFullscreen
|
|
3921
|
+
isFullscreen,
|
|
3922
|
+
columnConfigRevision
|
|
3910
3923
|
]);
|
|
3911
3924
|
const {
|
|
3912
3925
|
containerRef,
|
|
@@ -3985,6 +3998,7 @@ function ReactListTableInner(props, ref) {
|
|
|
3985
3998
|
next.set(columnKey, visible);
|
|
3986
3999
|
return next;
|
|
3987
4000
|
});
|
|
4001
|
+
setColumnConfigRevision((current) => current + 1);
|
|
3988
4002
|
},
|
|
3989
4003
|
onColumnOrderChange: (parentKey, orderedKeys) => {
|
|
3990
4004
|
setColumnOrders((current) => {
|
|
@@ -3992,6 +4006,7 @@ function ReactListTableInner(props, ref) {
|
|
|
3992
4006
|
next.set(parentKey, orderedKeys);
|
|
3993
4007
|
return next;
|
|
3994
4008
|
});
|
|
4009
|
+
setColumnConfigRevision((current) => current + 1);
|
|
3995
4010
|
},
|
|
3996
4011
|
onColumnWidthChange: (columnKey, width2) => {
|
|
3997
4012
|
setColumnConfig((current) => {
|
|
@@ -4002,6 +4017,7 @@ function ReactListTableInner(props, ref) {
|
|
|
4002
4017
|
});
|
|
4003
4018
|
return next;
|
|
4004
4019
|
});
|
|
4020
|
+
setColumnConfigRevision((current) => current + 1);
|
|
4005
4021
|
},
|
|
4006
4022
|
onColumnFixedChange: (columnKey, fixed) => {
|
|
4007
4023
|
setColumnConfig((current) => {
|
|
@@ -4012,6 +4028,7 @@ function ReactListTableInner(props, ref) {
|
|
|
4012
4028
|
});
|
|
4013
4029
|
return next;
|
|
4014
4030
|
});
|
|
4031
|
+
setColumnConfigRevision((current) => current + 1);
|
|
4015
4032
|
},
|
|
4016
4033
|
onResetColumns: () => {
|
|
4017
4034
|
const initialColumns = applyColumnManagerState(
|
|
@@ -4027,6 +4044,7 @@ function ReactListTableInner(props, ref) {
|
|
|
4027
4044
|
setColumnVisibility(/* @__PURE__ */ new Map());
|
|
4028
4045
|
setColumnOrders(/* @__PURE__ */ new Map());
|
|
4029
4046
|
setColumnConfig(/* @__PURE__ */ new Map());
|
|
4047
|
+
setColumnConfigRevision((current) => current + 1);
|
|
4030
4048
|
});
|
|
4031
4049
|
}
|
|
4032
4050
|
}
|