vakata / jstree

jquery tree plugin
http://jstree.com
MIT License
5.15k stars 1.38k forks source link

font-awesome icon problem on jstree leaf action #2512

Closed mardif closed 3 years ago

mardif commented 3 years ago

Hi @vakata ,

thanks a lot for this amazing project, it's very helpful!!! I'm using jstree+actions (both from npm repo) with my symfony 5 project + fontawesome (ver 5.12) + webpack encore. Adding the action to the tree with:

jstree.add_action('all', {
    id: 'show-action',
    event: 'click',
    selector: 'i.jstree-icon',
    title: 'Modify',
    after: true,
    text: "",
    'class': 'show-action fa fa-caret-right',
    callback: function (node_id, node, action_id, action_el, event) {
        func(node);
    }
});

webpack yarn run dev works without problem, but loading the page, I see it:

image

on the right side are present a list of svg.

If I change the class value removing the fa class (so finally it will be 'class': 'show-action fa-caret-right',), reloading the page I see:

image

If I inspect it with Chrome DevTool, and I add the fas class, I see the correct icon:

image

What will be the problem??

Thanks in advance

vakata commented 3 years ago

Sorry, this is related to actions which is not a plugin that I created - open an issue with the creator. Is there a repo for it?