Replies: 1 comment
|
A Solid resource should be handled the same way as a signal here: read the accessor inside the const emptyRows: Person[] = []
const [rows] = createResource(fetchRows)
const table = createTable({
features,
columns: props.columns(),
get data() {
return rows() ?? emptyRows
},
})If the resource is passed through a prop, pass the accessor and call it in the getter, e.g. |
0 replies
注册 for free
to join this conversation on GitHub.
Already have an account?
登录 to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I want to know how to use tanstack table with solid's createResource.
when 'data' is a signal, I found below works:
however, it does not work when data is a resource. after the resource settles from undefined and the data is populated, the tanstack table does not update with the data.
Any help would be appreciated :)
All reactions