Replies: 1 comment 2 replies
-
Though I’m sure there is better way to deal with this. The one I can recommend you from top of my head would be to use “useEffect” to run after table has been initiated and expand the rows. No need to pass rowIdsMap as initial state since it is normally used to remember user choices (saved on local storage or server). Run an useEffect and call function Do share if the approach worked for you… |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to have all rows expanded on initial table load. In order to do that, I have to pass all row ids into
useTable()
hook.Is there a way how to know all generated row ids in advance? When I have some grouped rows, row ids get composed based on group hierarchy so I don't know them.
I'm able to collect them from
tableInstance.rows
and then pass it to the hook again but that causes unnecessary re-render.Beta Was this translation helpful? Give feedback.
All reactions