0
<div class="sample-tree col-xs-3 col-sm-5">
{{ember-jstree
    actionReceiver=jstreeActionReceiver
    selectedNodes=jstreeSelectedNodes
    data=data
    eventDidBecomeReady="handleTreeBecomeReady"
    plugins=plugins
    themes=themes
    checkboxOptions=checkboxOptions
    contextmenu=contextmenu
    contextMenuReportClicked="contextMenuReportClicked"
    searchOptions=searchOptions
    stateOptions=stateOptions
    typesOptions=typesOptions
    searchTerm=searchTerm
    eventDidBecomeReady="handleTreeDidBecomeReady"
    eventDidHoverNode=eventDidHoverNode

}}

eventDidHoverNode: "hoverAction",

actions: {
   hoverAction: function(){
     // How can I apply the buttons to the view from here?
   },

I dont know what I should do to get this working. I am using this https://www.npmjs.com/package/ember-cli-jstree in ember.js.

I have used ember-cli-jstree plugin in my ember js project but I am able to add create, edit, delete bootstrap icon in hover action on node menu.

1 Answers1

0

You will get the node object, data and event as parameters for eventDidHoverNode action

hoverAction(node, data, event) {
    //you can set the icon using the below code
    this.get("treeObject").jstree(true).set_icon(node.id, "changed-icon");    
}

"treeObject" is a variable to be sent for ember-jstree component

{{ember-jstree
 ............
 treeObject=treeObject
 }}