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

refresh the node after event #28

Closed
rafmaghari opened this issue Jun 25, 2018 · 9 comments
Closed

refresh the node after event #28

rafmaghari opened this issue Jun 25, 2018 · 9 comments

Comments

@rafmaghari
Copy link

rafmaghari commented Jun 25, 2018

how to reload the node after events ?

@amsik
Copy link
Owner

amsik commented Jun 27, 2018

Hi! Could you give me more details or example?

@rafmaghari
Copy link
Author

rafmaghari commented Jun 27, 2018 via email

@rafmaghari
Copy link
Author

rafmaghari commented Jun 27, 2018 via email

@rafmaghari
Copy link
Author

For example I want to reload all the items in tree view after I save an item

@amsik
Copy link
Owner

amsik commented Jul 3, 2018

Please take a look at the documentation: https://amsik.github.io/liquor-tree/#Tree-API. It should help you

@minedun6
Copy link

minedun6 commented Oct 5, 2018

This feature exists in jsTree where you can ask the plugin to re-query the provided data source, either local array or backend. Let's say that someone changed the tree structure and you maybe you want to manually refresh the data coming from the backend.

@amsik
Copy link
Owner

amsik commented Oct 6, 2018

You are able to refresh data via setModel method. Received data will override the data.

const tree = this.$refs.tree;
tree.setModel([
  {text: 'My text 1'},
  {text: 'My text 2', state: { selected: 1 } 
])

@minedun6
Copy link

minedun6 commented Oct 7, 2018

Perfect !
Maybe there could also be a way to change the data (attributes) coming from the backend but keep the state (selected/opened/checked) for each one.

@amsik
Copy link
Owner

amsik commented Oct 9, 2018

@amsik amsik closed this as completed Oct 17, 2018
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