vakata / jstree

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

types-plugin: a_attr/li_attr are not merged to nodes #2761

Closed SKPFCW closed 1 week ago

SKPFCW commented 9 months ago

It seems that the a_attr- and li_attr-objects in the types-plugin-configuration are not merged into the node-objects:

  $("#test").jstree({    
    core: {
      data: [
        { "id":"fldr0000", "text":"Folder 1", "parent":"#","type": "folder" },
        { "id":"doc0000", "text":"Document 1", "parent":"fldr0000", "type":"doc" }
      ]
    },
    plugins: ["types"],
    types: {
      folder: {
        a_attr: { title: "Its a Folder" },
        li_attr: { class:"folderClass" },
        icon: false
      },
      doc: {
        a_attr: { title: "Its a Document" },
        li_attr: { class: "docClass" },
        icon: false
      }
    }
  });

Result: Neither title- nor class-attributes where rendered into the li-/a-tags: image

jsFiddle: https://jsfiddle.net/a7jyx94w/4/

vakata commented 1 week ago

Seems to work fine with 3.3.16 (the latest version from a few months ago)