ticked in q-tree
-
Hello friends
I would like to know why, with the given configuration, it does not return the value 20
tickStrategy: "leaf", tickStrategies: [ { value: "none", label: "None" }, { value: "strict", label: "Strict" }, { value: "leaf", label: "Leaf" }, { value: "leaf-filtered", label: "Leaf Filtered" } ]
<q-tree ref="tree" :nodes="nodes" node-key="nodeKey" color="secondary" default-expand-all :tick-strategy="tickStrategy" :ticked.sync="ticked" @update:selected="selectNode" @update:ticked="updateTicked" :selected="selected" />
-
when i use tickStrategy = strict, if you get value
-
@eloy-silva said in ticked in q-tree:
I would like to know why, with the given configuration, it does not return the value 20
When
tickStrategy
isleaf
, only leaves that are ticked are returned. In your case,usuarios
is not a leaf, since it has children.If you want to have the branch in ticked array as well, you have to stick with
strict
mode, and make an event handler to automatically tick/untick children when parent is ticked. -
@tof06 said in ticked in q-tree:
When tickStrategy is leaf, only leaves that are ticked are returned. In your case, usuarios is not a leaf, since it has children.
If you want to have the branch in ticked array as well, you have to stick with strict mode, and make an event handler to automatically tick/untick children when parent is ticked.thank you very much friend