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

not able to add the popup for adding the child from the node and deleting node #77

Open
surendrapaluikey opened this issue Dec 15, 2020 · 3 comments

Comments

@surendrapaluikey
Copy link

surendrapaluikey commented Dec 15, 2020

I have used the slot in this format but whenever I click on the text of the node it won't pop up.

code :

<tree :data="data" layoutType="horizontal" :radius="10" > <template #popUp="{data,node}"> <div class="btn-group-vertical"> <button @click="addFor(data)"> <i class="fa fa-plus" aria-hidden="false"></i> </button> <button @click="remove(data, node)"> <i class="fa fa-trash" aria-hidden="false"></i> </button> </div> </template> </tree>
any suggestion ?

@dnzmsc
Copy link

dnzmsc commented Apr 16, 2021

Same problem, did you solve it?

@MarkoArsic
Copy link

MarkoArsic commented May 26, 2021

This works for me,

<tree :data="tree" node-text="name" layoutType="vertical" type="tree" :duration="700" linkLayout="bezier" :zoomable="true" :minZoom="0.01" :maxZoom="35" :radius="6" > <template #popUp="{data,node}"> <div> <q-btn color="primary" outline @click="addNode(data)" icon="add_circle_outline" /> <q-btn color="negative" outline @click="removeNode(data, node)" icon="remove_circle_outline" /> </div> </template> </tree>

@Sakthi002
Copy link

Solution Found.

use this <template slot="popUp" slot-scope="{data,node}"> instead of this <template #popUp="{data,node}">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants