-
Notifications
You must be signed in to change notification settings - Fork 35
How to update v-model in BaseTree #152
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
Comments
it only watch v-model object self's change. |
Are there any other ways to refresh the node so it shows its updated children when the open:node event triggers? |
use inner methods to update node: https://hetree.phphe.com/v2/api#methods |
ok, thanks. I just checked the documentation, but there are no update node methods available currently ? The add method would not suffice as it will replace the whole state. All I want is to replace the existing children with new children. |
you can record state in your node, then use https://hetree.phphe.com/v2/api#stathandler restore them when init the node |
ok, i got the idea how to handle all kind of situations, thanks for the help! |
Uh oh!
There was an error while loading. Please reload this page.
`
<v-text-field
label="Search Contract"
v-model="search"
color="secondary"
hide-details
clearable
clear-icon="mdi-close-circle-outline"
@input="filterTreeData">
I have a BaseTree component with a v-model bound to filteredTreeData.
I'm facing an issue where, when I dynamically update the tree nodes bound to filteredTreeData through the open:node event, I can see filteredTreeData is updated with the new children of the node when it opens (as confirmed in the Dev Tools), and also vue watchers also showing filteredTreeData nodes is updated with new chidlren.
However, the UI does not reflect these updates immediately. The updated nodes only appear when the tree is re-initialized. What could be the issue here?
The text was updated successfully, but these errors were encountered: