Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand tree by clicking title #46

Closed
bingimar opened this issue Feb 14, 2019 · 1 comment
Closed

Expand tree by clicking title #46

bingimar opened this issue Feb 14, 2019 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@bingimar
Copy link

is there a way of expanding the node by clicking the title?

@holiber holiber self-assigned this Feb 19, 2019
@holiber
Copy link
Owner

holiber commented Feb 20, 2019

You can handle your own events in the title slot:

<sl-vue-tree v-model="nodes">
    <template slot="title" slot-scope="{ node }">

      <div class="my-custom-title" @click="expandNode(node)">
        {{ node.title }}
      </div>
      
    </template>
</sl-vue-tree>
expandNode(node) {
  this.refs.slVueTree.updateNode(node.path, { isExpanded: true });
}

@holiber holiber added the question Further information is requested label Apr 3, 2019
@holiber holiber closed this as completed Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants