T
TanStack3y ago
itchy-amethyst

svelte

Is it possible to "bind" a property value when using the flexRender function?
{
id: 'player_info_header',
header: (header) => {
return flexRender(TableFilter, {
'bind:value': globalFilter,
})
},
columns: [
{
id: 'player_info_header',
header: (header) => {
return flexRender(TableFilter, {
'bind:value': globalFilter,
})
},
columns: [
I want to render a filter in the header column and bind the value to the globalFilter variable. I can't find any examples of people binding a value while using the flexRender function, so not sure if it is possible.
1 Reply
itchy-amethyst
itchy-amethystOP3y ago
Or even if I could render a component literal...
header: (header) => {
const component = `<TableFilter bind:value={globalFilter} />`
return flexRender(component, {});
header: (header) => {
const component = `<TableFilter bind:value={globalFilter} />`
return flexRender(component, {});

Did you find this page helpful?