@aimerthyr/virtual-table 1.3.3 → 1.4.0
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 +13 -0
- package/README.md +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1 -1
- package/dist/virtual-table.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ export declare interface VTableBodyCellProps<TData = any> {
|
|
|
69
69
|
column: VTableColumn;
|
|
70
70
|
row: TData;
|
|
71
71
|
rowIndex: number;
|
|
72
|
+
isEditing: boolean;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
/** 表体样式配置 */
|
|
@@ -206,6 +207,7 @@ export declare const vTableDefaultProps: {
|
|
|
206
207
|
onScrollToBottom?: (() => void) | ((props: VTableProps<any>) => () => void) | undefined;
|
|
207
208
|
onExpandedRowsChange?: ((expandState: VTableExpandedState) => void) | ((props: VTableProps<any>) => (expandState: VTableExpandedState) => void) | undefined;
|
|
208
209
|
onColumnSizingChange?: ((columnSizing: VTableColumnSizingState) => void) | ((props: VTableProps<any>) => (columnSizing: VTableColumnSizingState) => void) | undefined;
|
|
210
|
+
onExpand?: ((expanded: boolean, row: any) => void) | ((props: VTableProps<any>) => (expanded: boolean, row: any) => void) | undefined;
|
|
209
211
|
};
|
|
210
212
|
|
|
211
213
|
/** 展开状态 */
|
|
@@ -239,6 +241,8 @@ export declare interface VTableInstance<TData = any> {
|
|
|
239
241
|
tanstackTable: Table<TData>;
|
|
240
242
|
/** 滚动到指定下标(从 0 开始,默认是平滑滚动) */
|
|
241
243
|
scrollToIndex: (index: number, behavior?: 'auto' | 'smooth') => void;
|
|
244
|
+
/** 设置当前编辑行 (传 null 代表退出编辑态) */
|
|
245
|
+
setEditingRow: (rowId: string | number | null) => void;
|
|
242
246
|
}
|
|
243
247
|
|
|
244
248
|
export declare interface VTableLoadMoreConfig {
|
|
@@ -379,6 +383,8 @@ export declare interface VTableProps<TData = any> {
|
|
|
379
383
|
onExpandedRowsChange?: (expandState: VTableExpandedState) => void;
|
|
380
384
|
/** 列宽调整回调 */
|
|
381
385
|
onColumnSizingChange?: (columnSizing: VTableColumnSizingState) => void;
|
|
386
|
+
/** 点击展开图标回调 */
|
|
387
|
+
onExpand?: (expanded: boolean, row: TData) => void;
|
|
382
388
|
}
|
|
383
389
|
|
|
384
390
|
export declare type VTableRowKey<TData> = string | number | ((row: TData) => string | number);
|