Open sgoldcreatives opened 6 months ago
no way
Another (related) issue is that if the user sorts the table and then moves away from the page, when he goes back the table will be unsorted. It would be great if we could have a way to trigger sorting programmatically.
For anyone that sees this, I had a similar issue and solved it by setting a key
attribute on the Table component. Whenever that key changes, it causes the Table component to re-render
Hi @edgeboy47 , I tried that but not working. @edgeboy47 can show me some code!!
For anyone that sees this, I had a similar issue and solved it by setting a
key
attribute on the Table component. Whenever that key changes, it causes the Table component to re-render
Thank you, worked for me!
Changing the key as suggested by @edgeboy47 works, but this is pretty hacky.
My use case is to dynamically change some components in a table in Edit mode, i.e. if I want to edit a row inline in the table, then I can click on an edit button and then the cells of that row will become editable.
Discussed in https://github.com/nextui-org/nextui/discussions/2192
{cellValue}
{Number(cellValue) * Number(weight)} // should change dynamically, if I hardcode weight to 5 for example, dosage will stay cellValue * 5