Svelte table flexRender gives type error
<svelte:component this={flexRender(cell.column.columnDef.cell, cell.getContext())} />
<svelte:component this={flexRender(cell.column.columnDef.cell, cell.getContext())} />
Argument of type '{ render: (props?: {} | undefined, { $$slots, context }?: { $$slots?: {} | undefined; context?: Map<any, any> | undefined; } | undefined) => { html: any; css: { code: string; map: any; }; head: string; }; $$render: (result: any, props: any, bindings: any, slots: any, context: any) => any; } | (new (options: any) => ...' is not assignable to parameter of type 'ConstructorOfATypedSvelteComponent | null | undefined'.
Type '{ render: (props?: {} | undefined, { $$slots, context }?: { $$slots?: {} | undefined; context?: Map<any, any> | undefined; } | undefined) => { html: any; css: { code: string; map: any; }; head: string; }; $$render: (result: any, props: any, bindings: any, slots: any, context: any) => any; }' is not assignable to type 'ConstructorOfATypedSvelteComponent'.
Type '{ render: (props?: {} | undefined, { $$slots, context }?: { $$slots?: {} | undefined; context?: Map<any, any> | undefined; } | undefined) => { html: any; css: { code: string; map: any; }; head: string; }; $$render: (result: any, props: any, bindings: any, slots: any, context: any) => any; }' provides no match for the signature 'new (args: { target: any; props?: any; }): ATypedSvelteComponent'.
Argument of type '{ render: (props?: {} | undefined, { $$slots, context }?: { $$slots?: {} | undefined; context?: Map<any, any> | undefined; } | undefined) => { html: any; css: { code: string; map: any; }; head: string; }; $$render: (result: any, props: any, bindings: any, slots: any, context: any) => any; } | (new (options: any) => ...' is not assignable to parameter of type 'ConstructorOfATypedSvelteComponent | null | undefined'.
Type '{ render: (props?: {} | undefined, { $$slots, context }?: { $$slots?: {} | undefined; context?: Map<any, any> | undefined; } | undefined) => { html: any; css: { code: string; map: any; }; head: string; }; $$render: (result: any, props: any, bindings: any, slots: any, context: any) => any; }' is not assignable to type 'ConstructorOfATypedSvelteComponent'.
Type '{ render: (props?: {} | undefined, { $$slots, context }?: { $$slots?: {} | undefined; context?: Map<any, any> | undefined; } | undefined) => { html: any; css: { code: string; map: any; }; head: string; }; $$render: (result: any, props: any, bindings: any, slots: any, context: any) => any; }' provides no match for the signature 'new (args: { target: any; props?: any; }): ATypedSvelteComponent'.
3 Replies
flat-fuchsiaOP•3y ago
would be cool to just have a function something like
cell.renderComponent()
instead of introducing a new functionautomatic-azure•3y ago
Same problem got any solutin?
foreign-sapphire•3y ago
Any updates on this?