hummingbird-dev / hummingbird-treeview

A powerful and fast jQuery treeview plugin
MIT License
62 stars 23 forks source link

Feature request: pre-checked items #16

Open cfreear opened 4 years ago

cfreear commented 4 years ago

It would be handy to be able to mark an item that should be checked in the pseudo html format, maybe using a data attribute, something like:

<div class="hummingbird-treeview-converter">
    <li>Warner Bros.</li>
    <li>-Goodfellas</li>
    <li>--Robert De Niro</li>
    <li>--Joe Pesci</li>
    <li data-checked>-The Shawshank Redemption</li>
    <li>--Tim Robbins</li>
    <li>--Morgan Freeman</li>
    <li>Paramount</li>
    <li>-The Untouchables</li>
    <li>--Robert De Niro</li>
    <li>--Kevin Costner</li>
    <li>-Forrest Gump</li>
    <li>--Tom Hanks</li>
    <li>--Robin Wright</li>
</div>
hummingbird-dev commented 4 years ago

Yes, good point, pre-checking is sometimes needed and can be achieved by adding a snippet of code. I have added the procedure at https://github.com/hummingbird-dev/hummingbird-treeview#add-on-options-and-functionality