ludo / jquery-treetable

jQuery plugin to show a tree structure in a table
http://ludo.cubicphuse.nl/jquery-treetable
GNU General Public License v2.0
741 stars 278 forks source link

Nested treetables do not work #184

Open ahenket opened 8 years ago

ahenket commented 8 years ago

I have a tree structure that requires a top level fold, and on some rows has a nested table that could contain its own fold. The inner table do not initialize correctly however.

Is that worth a future enhancement or should it be possible and am I goofing somewhere?

<table id="x" class="treetable">
    <tr data-tt-id="level1">
        <td>row1-col1</td>
        <td>row1-col2</td>
        <td>row1-col3</td>
    </tr>
    <tr data-tt-id="level2" data-tt-parent-id="level1">
        <td>row2-col1</td>
        <td>row2-col2</td>
        <td>
            <span>row2-col3-with-new-table-fold</span>
            <table id="y" class="treetable">
                <tr data-tt-id="deeplevel1">
                    <td>row</td>
                </tr>
                <tr data-tt-id="deeplevel2" data-tt-parent-id="deeplevel1">
                    <td>text</td>
                </tr>
            </table>
        </td>
    </tr>
</table>
dobrys commented 7 years ago

The reason is buggy CSS easiest solution is to change "jquery.treetable.theme.default.css"

FROM : table.treetable tr.collapsed span.indenter a { background-image: url(data: ...... TO : table.treetable tr.collapsed td > span.indenter a { background-image: url(data: ....