chniter / bstreeview

Bootstrap Treeview, A very simple plugin to build a basic and elegant Treeview with bootstrap 4. See the demo:
https://chniter.github.io/bstreeview/
Apache License 2.0
367 stars 53 forks source link

Possibility to add attributes #35

Open seyfcom opened 1 year ago

seyfcom commented 1 year ago

First of all, thanks for the work!

I needed to expand possibilities and neede attributes, like data-something="....." data-somethingelse="...." but I can't easily do it.

My propositon is to filter, any that is not specific to your option on a node, you put it as data-KEY_OF_LINE="CONTENT OF LINE"

You might filter a little to avoid strange things, but I thing it should work. If you want to make it more strict, give a list of data-attributes, like attribute1, attribute2, and so on, just need to be attribute+integer.

Would be great ! thanks