@dobbel thanks for the reply and sorry for the late response.
your solution works on paper but the tick strategy is lost, :ticked.sync is also lost - both important things to reduce code. cleanest way would be to somehow resolve the bug only by props or something

cipsss
@cipsss
Frontend Developer, Web Efficient
Latest posts made by cipsss
-
RE: Q-Tree lazy load and checkboxes (ticks) bug
-
RE: Q-Tree lazy load and checkboxes (ticks) bug
@dobbel sorry, youre right
So i edited the lazy loaded example from q-tree component (https://quasar.dev/vue-components/tree#Lazy-loading )
I only added the prop tick-strategy=“leaf” (can be any strategy) to the q-tree componentWhat i want is to have the tick checkboxes present for every tree node all the time, not only when a tree node has been expanded to the point where children nodes dont have any children nodes left.
In the codepen example, you can see that only “Node is not expandable” has the checkbox visible, i want all of them to have it.
I hope this is clearer now, if not - don’t hesitate to replyCodepen link:
https://codepen.io/ciprianlupsa/pen/MWeqoXz?editable=true&editors=101%3Dhttps%3A%2F%2Fquasar.dev%2F -
Q-Tree lazy load and checkboxes (ticks) bug
Hello guys! I started exploring quasar to use in a project rewrite in Vue so far all good, love the framework.
However, i stumbled upon a, what i consider to be a bug with the q-tree component.
If we are using lazy load with the tree to populate the node children (from rest api) the checkboxes dont show until all the children have been populated.
I think if we give the q-tree the “tick-strategy” prop it should still apply to the lazy load feature and show the checkboxes all the time.
In my particular use case, there are alot of nested nodes and the app doesnt expect the user to expand all the tree items so it simply doesnt work this way.This stackoverflow issue is describing the exact same problem:
https://stackoverflow.com/questions/61489961/q-tree-how-to-add-checkbox-for-all-nodesAny way to fix this behaviour?
Thank you!
-
RE: Desktop Template & Mobile Template both in the same page?
In the quasar conf, there was a speaker that mentioned he made different components layouts and using the platform detection, he loaded the mobile-component.vue when the platform is mobile and desktop-component.vue - i dont remember much sorry
i would use the same principle, make duplicate components if the component is radically different from desktop to mobile and probably lazy load them on demand, didnt try it yet…its just an ideea so far