Open ForbiddenEra opened 8 months ago
I was able to 'emulate' the files selected functionality by overwriting the element immediately after running new Treeselect()
and also within the input event/inputCallback
:
After new Treeselect()
:
document.querySelector('.treeselect-input__tags-count').innerHTML = `${ev.target.files.length} file(s) selected`;
and inputCallback
:
inputCallback: (x)=>{
document.querySelector('.treeselect-input__tags-count').innerHTML = `${x.length} file(s) selected`;
},
Hi,
This is actually potentially useful as a file selector and I'm trying to use it as such.
It'd be great if I could add a property so that certain groups (directories in my case) are open/closed by default. For example, in my case it's used with an HTML
input
withwebkitdirectory
to allow devs to upload source, would be great to be able to have groups expanded to a certain point (which is already doable of course) but also have groups for directories like.git
ornode_modules
specifically not ever pre-expanded.It'd also be great if the tags count could optionally include all children, if I set
tagsCountText
to "file(s) selected" it shows up like "3 file(s) selected" if 3 groups (directories) are selected but that ignores any tags/entries (files) in each group.Thanks!