@canvas-components/react-list-table 0.2.2 → 0.2.3
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 +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -36,6 +36,8 @@ interface ReactListTableToolbarOptions {
|
|
|
36
36
|
/** 默认导出行为使用的文件名和汇总行配置。 */
|
|
37
37
|
exportOptions?: ListTableExportXlsxOptions;
|
|
38
38
|
onRefresh?: () => void;
|
|
39
|
+
/** 表格密度变化回调,依次对应紧凑、中等和宽松。 */
|
|
40
|
+
onDensityChange?: (density: 32 | 40 | 48) => void;
|
|
39
41
|
/** 自定义导出行为;未配置时默认异步导出全量 XLSX 数据。 */
|
|
40
42
|
onExport?: () => void;
|
|
41
43
|
/** 自定义全屏节点,默认使用表格根容器。 */
|
package/dist/index.d.ts
CHANGED
|
@@ -36,6 +36,8 @@ interface ReactListTableToolbarOptions {
|
|
|
36
36
|
/** 默认导出行为使用的文件名和汇总行配置。 */
|
|
37
37
|
exportOptions?: ListTableExportXlsxOptions;
|
|
38
38
|
onRefresh?: () => void;
|
|
39
|
+
/** 表格密度变化回调,依次对应紧凑、中等和宽松。 */
|
|
40
|
+
onDensityChange?: (density: 32 | 40 | 48) => void;
|
|
39
41
|
/** 自定义导出行为;未配置时默认异步导出全量 XLSX 数据。 */
|
|
40
42
|
onExport?: () => void;
|
|
41
43
|
/** 自定义全屏节点,默认使用表格根容器。 */
|
package/dist/index.js
CHANGED
|
@@ -2770,6 +2770,7 @@ function ReactListTableInner(props, ref) {
|
|
|
2770
2770
|
rowKey,
|
|
2771
2771
|
columns,
|
|
2772
2772
|
dataSource,
|
|
2773
|
+
onRow,
|
|
2773
2774
|
theme,
|
|
2774
2775
|
striped,
|
|
2775
2776
|
highlightMode,
|
|
@@ -2824,6 +2825,7 @@ function ReactListTableInner(props, ref) {
|
|
|
2824
2825
|
rowKey,
|
|
2825
2826
|
columns: resolvedColumns,
|
|
2826
2827
|
dataSource,
|
|
2828
|
+
onRow,
|
|
2827
2829
|
theme,
|
|
2828
2830
|
striped,
|
|
2829
2831
|
highlightMode,
|
|
@@ -2856,6 +2858,7 @@ function ReactListTableInner(props, ref) {
|
|
|
2856
2858
|
rowKey,
|
|
2857
2859
|
resolvedColumns,
|
|
2858
2860
|
dataSource,
|
|
2861
|
+
onRow,
|
|
2859
2862
|
theme,
|
|
2860
2863
|
striped,
|
|
2861
2864
|
highlightMode,
|
|
@@ -2937,7 +2940,12 @@ function ReactListTableInner(props, ref) {
|
|
|
2937
2940
|
density: resolvedRowHeight === "auto" ? 40 : resolvedRowHeight ?? 40,
|
|
2938
2941
|
hostRef: shellRef,
|
|
2939
2942
|
onExport: (options2) => tableRef.current?.exportXlsx(options2),
|
|
2940
|
-
onDensityChange:
|
|
2943
|
+
onDensityChange: (density) => {
|
|
2944
|
+
setDensityOverride(density);
|
|
2945
|
+
if (toolbar) {
|
|
2946
|
+
toolbar.onDensityChange?.(density);
|
|
2947
|
+
}
|
|
2948
|
+
},
|
|
2941
2949
|
onColumnVisibilityChange: (columnKey, visible) => {
|
|
2942
2950
|
setColumnVisibility((current) => {
|
|
2943
2951
|
const next = new Map(current);
|