I have a use case in which I am dynamically creating the TabPanels based on category and further dynamically creating a TreeTable component inside the rendered TabView. The rendering works perfectly. The issue I'm running into is that when I change the tab, the TreeTable in the current tab is unmounted and I lose the state of the selected elements. I need for the selections to persist through the tab changes.
Is there a way for the TabPanel to not unmount components that are rendered inside? If this isn't possible, is there a way of passing in what parent/child nodes need to be selected to a TableTree component when a previous tab has been clicked?
Thanks all for any help.
TreeTable Component used in TabPanel is unmounted onTabChange
Not yet, but we will add to support for render attribute inside tabs for next versions.
You can follow from this link; https://github.com/primefaces/primereact/issues/618
You can follow from this link; https://github.com/primefaces/primereact/issues/618
Given that the prop for rendering isn't available at the moment, could I get some advice on passing data node into TreeTable in which the children have 'selected' elements?
I realize there is TreeNode, but I'm not sure exactly how to populate that with values that are selected that would further be passed into the 'selection' prop? Thanks for the support. - J
I realize there is TreeNode, but I'm not sure exactly how to populate that with values that are selected that would further be passed into the 'selection' prop? Thanks for the support. - J
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
New RC1 will come out this week with the new renderActiveOnly for TabView and the all new TreeTable.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 22 guests