[datatables vue]v-show does not work in slot templates
[datatables vue]v-show does not work in slot templates
serisu627
Posts: 5Questions: 1Answers: 0
in DataTables
This issue has been mentioned in the project's GitHub issues section, and I would like to inquire about it here.
https://github.com/DataTables/Vue/issues/32
i use Stackbltiz to create a running example
https://stackblitz.com/edit/vitejs-vite-5madia3d?file=src%2Fcomponents%2Fdatatbles.vue
Can you help me solve this problem?
thank you!!
Replies
Thank you for the test case! The problem here is that DataTables doesn't "see" the change in the external variable so it doesn't redraw with the updated information. It does look for changes in the source data for the table, and if you change the data at the same time as
isCheckthen it will update as expected:Updated test case.
I'm wondering if I should provide a way to give the component variables to watch (i.e.
isCheckin this case). It would of course be better not to need that at all - however, I suspect due to the DOM control DataTables has, something will be needed. I'll look into it further.Allan
Hello allan
Thank you so much for your answer and help.
I will proceed based on the method you provided for now.
It would be great if this question could be updated in the future!