cssvue.jsquasar-framework

Displaying a checkbox in Vue Quasar Tree


How can I remove the checkbox display for parent nodes, i.e. nodes that have children in the component Tree.

I tried it through the class.

.q-checkbox__inner) {
  display: none;

But then all the checkboxes disappear. I would like to know how to do this


Solution

  • This is achievable out of the box just using the QTree API. Please refer to the documentation.

    Given a node with children, give the node noTick: true property to remove it's checkbox.

    {
      label: 'Test', noTick: true,
      children: [
        { label: 'Foo'},
        { label: 'Bar'},
        { label: 'Baz'}
      ]
    }