No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    ticked in q-tree

    Framework
    2
    4
    436
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      eloy.silva last edited by

      Hello friends

      I would like to know why, with the given configuration, it does not return the value 20

      tree.png

      tree2.png

       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"
          />
      
      T 1 Reply Last reply Reply Quote 0
      • E
        eloy.silva last edited by

        when i use tickStrategy = strict, if you get value

        1 Reply Last reply Reply Quote 0
        • T
          tof06 @eloy.silva last edited by

          @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 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.

          E 1 Reply Last reply Reply Quote 0
          • E
            eloy.silva @tof06 last edited by

            @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

            1 Reply Last reply Reply Quote 0
            • First post
              Last post