Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reloading/Refreshing treetable on object associated change #211

Open
Cardozo17 opened this issue Feb 6, 2018 · 4 comments
Open

Reloading/Refreshing treetable on object associated change #211

Cardozo17 opened this issue Feb 6, 2018 · 4 comments

Comments

@Cardozo17
Copy link

I am using treetable with vuejs and I sometimes need to fully reload the treetable structure when my object associated to it is updated. I am trying to accomplish this by destroying my treetable instance and then removing the intenders. Problem is that after I destroy my treetable and initiate it again my branches are all messed up. Any suggestions?. Thanks in advance.

@Tigzy
Copy link

Tigzy commented Jun 15, 2018

Hey, having the same issue here. The parent/child tree is gone, and I cannnot expand/collapse anymore.

@Cardozo17
Copy link
Author

We resolved this not by destroying the instance but removing all the inherit classes added by treetable and then instantiating the table again.

@Tigzy
Copy link

Tigzy commented Jun 29, 2018

I solved this with a query string and reloading the page :(
Do you have sample code for achieving this?

@Arvi128
Copy link

Arvi128 commented Mar 19, 2019

You can force the tree to reinitialize by passing boolean value true as a paramter to the treetable function call.
$("#table_id").treetable({ indent:15 } ,true);

This is from the official docs :

The treetable() function accepts the following arguments:

options (optional)
A Javascript object of configuration settings as described in the chapter on configuration.
force (optional)
Pass the boolean true to force reinitialization of the tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants