alexandernst / jstree-actions

jstree plugin that allows adding actions on each node
GNU General Public License v3.0
12 stars 12 forks source link

font-awesome icon problem on jstree leaf action #15

Open mardif opened 3 years ago

mardif commented 3 years ago

Hi,

thanks a lot for this add-on jstree plugin, 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 could be the problem??

Thanks in advance

alexandernst commented 3 years ago

I really can't tell. Last time I spent any time (not reviewing other people's MRs) was 6 years ago. I'm sorry.

mardif commented 3 years ago

;(