TanStackT
TanStack13mo ago
21 replies
awake-maroon

lit table data not reactive

I'm trying to set up a table using the lit adapter with my data stored as a nanostore atom. In my console.log output, I can see that my lit element's render function is being called when the nanostore that contains the data updates, and that the render function does in fact see the updated values for the data. However, the table continues to dispaly the initial values.

I tried, as part of debugging, using the vanilla js createTable function from @tanstack/table-core with as close to the same options as I could (that function seems to require a few things be present in the options that the lit controller doesn't?). When I run the table this way, the data is reactive, but the table is not (clicking headers does not resort the data).

I'm having trouble figuring out what I might be doing wrong, and would appreciate any pointers on how to debug this.

also, please forgive the bad tagging, a tag is required but none seem appropriate.
Was this page helpful?