Page 1 of 1

Treetable can't be correctly updated

Posted: 09 Oct 2020, 08:00
by kenddriz
I'm new with Prime. I use primevue for my project. To print my product categories and subcategories, I use treetable. When I add new subcategory to a category which doesn't have any child yet, it's perfectly added, but I can't see it immediatly cause expender icon doesn't show itself until after I try to filter or refresh page,

Re: Treetable can't be correctly updated

Posted: 10 Oct 2020, 15:54
by cagatay.civici
Try to create a new instance of your tree model.

Please see;

https://vuejs.org/v2/guide/reactivity.html#For-Arrays

Re: Treetable can't be correctly updated

Posted: 13 Oct 2020, 09:57
by kenddriz
Thank you! But I don't know how to do that.
I mean creating new treetable instance

Re: Treetable can't be correctly updated

Posted: 12 Nov 2020, 11:10
by mert.sincan
Hi,

You can use vm.$set(vm.items, indexOfItem, newValue) on Vue2. Please examine the shared link for details.

Best Regards,