The IHeaderCellConfig doesn't seem to match the implementation.
|
export interface IHeaderCellConfig extends IHeaderCell { |
|
cell?: Component< |
|
ICellProps & { |
|
cell: Omit<IHeaderCell, "cell">; |
|
} |
|
>; |
|
} |
e.g. the implementation hasgetRowIndex on the header cell api and getState/getReactiveState do not return the full table api.
I'm using the following patch in my project to match types to implementation:
diff --git a/types/index.d.ts b/types/index.d.ts
index fa9ca873165746354be8a452494abd73f09a9827..125afb45cc08dc391babee221a71cf5b8bfd7e8b 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -41,12 +41,24 @@ export interface ICellProps {
onaction: (ev: { action?: any; data?: { [key: string]: any } }) => void;
}
+export interface IHeaderCellApi {
+ exec: IApi["exec"];
+ getState: IApi["getState"];
+ getReactiveState: IApi["getReactiveState"];
+ getRow: IApi["getRow"];
+ getRowIndex: (id: number | string, data?: unknown[]) => number;
+}
+
+export interface IHeaderCellProps {
+ api: IHeaderCellApi;
+ row: number;
+ column: IColumn;
+ cell: Omit<IHeaderCell, "cell">;
+ onaction: (ev: { action?: any; data?: { [key: string]: any } }) => void;
+}
+
export interface IHeaderCellConfig extends IHeaderCell {
- cell?: Component<
- ICellProps & {
- cell: Omit<IHeaderCell, "cell">;
- }
- >;
+ cell?: Component<IHeaderCellProps>;
}
export type TColumnHeaderConfig =
The
IHeaderCellConfigdoesn't seem to match the implementation.grid/svelte/types/index.d.ts
Lines 44 to 50 in ef5efdb
e.g. the implementation has
getRowIndexon the header cell api andgetState/getReactiveStatedo not return the full table api.I'm using the following patch in my project to match types to implementation: