-
I have implmented the datatree layout which is fantastic for my use case but i'm having issues with downloads, being that unless the children are expanding they dont show in the csv download (which is to be expected based on 6.2 docs). Is anyone using datatrees and been able to implment something similar that they would be willing to share please? My issue is that although i have all children expanded upon loading, if a user collapses one and then downloads the table they cant tell from the csv file that the row should have a child/children and could lead to issues with interpretting the file. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
As an example of what I've tried, I thought maybe on the event the collaspe button is clicked I could just use the event to expand the treee again to stop users collapsing the rows so they always show in the downloads, as the
But the row in the function returns an int, being the top level of the tree I presume: `def row_expand(self, e, row): returns If I use something like:
I get the following including the error:
What I cant work out is how to retrieve the row like you can with events which are available within the design view such as 'row_click' event which returns the actual row rather than an int, which is what I believe I need to be able to action the Has anyone had any luck with this? |
Beta Was this translation helpful? Give feedback.
It was me... funnily enough! I had a seperate function from a previous test that was causing issues.
Essentially this disables the ability for a user to collaspe a tree by setting the
"dataTreeStartExpanded": True
within the table options, and thenon
the event of someone collapsing the tree:self.tabulator_1.on("dataTreeRowCollapsed", self.row_expand)
Which calls:
This instantly expands the tree to keep it open, which is what I needed in my use case. The
print
lines can be ommited or hashed out as are just there for testing/debugging.Thanks for listening to an idiot rant... ;-)