HTML
xxxxxxxxxx
1
<div class="container my-4">
2
<p>
3
<strong>Treeview functionality makes displaying hierarchical information easy. </strong
4
>
5
</p>
6
7
<p>Below you'll find a treeview table. Add class <code>.show</code> do the <code>ul</code> element below to show the tree view row content. </p>
8
9
<a href="https://mdbootstrap.com/docs/standard/plugins/tree-view/">Treeview docs for reference</a>
10
<br>
11
<a href="https://mdbootstrap.com/docs/standard/data/tables/">Tables docs for reference</a>
12
13
14
15
16
<hr />
17
18
<p class="font-weight-bold">Basic examples</p>
19
20
<p>
21
You will <strong>find the code structure for this example in the tabs on the left</strong>. For even <strong>more examples, resources & customization options</strong> click the red <button class="btn btn-danger btn-sm">DOCS</button> button in the upper left corner.
22
</p>
23
24
<div class="border p-5 mb-5">
25
<!-- Copy this code to have a working example -->
26
27
<table class="table">
28
<thead>
29
<tr>
30
<th colspan="4">This a treeview table</th>
31
</tr>
32
</thead>
33
<tbody>
34
<tr>
35
<th>This a normal row</th>
36
<td>item 1</td>
37
<td>item 1</td>
38
<td>item 1</td>
39
</tr>
40
<tr>
41
<th colspan="4" class="p-0">
42
<div class="treeview">
43
<ul class="m-0">
44
<li>
45
<a class="p-3">This a treeview row</a>
46
<ul>
47
<li>
48
<table class="table">
49
<tr>
50
<th scope="row">1</th>
51
<td>Mark</td>
52
<td>Otto</td>
53
<td>@mdo</td>
54
</tr>
55
<tr>
56
<th scope="row">2</th>
57
<td>Jacob</td>
58
<td>Thornton</td>
59
<td>@fat</td>
60
</tr>
61
<tr>
62
<th scope="row">3</th>
63
<td colspan="2">Larry the Bird</td>
64
<td>@twitter</td>
65
</tr>
66
</table>
67
</li>
68
69
</ul>
70
</li>
71
</ul>
72
</div>
73
</th>
74
</tr>
75
<tr>
76
<th colspan="4" class="p-0">
77
<div class="treeview">
78
<ul class="m-0">
79
<li>
80
<a class="p-3">MDBootstrap creators</a>
81
<ul class="show">
82
<li>
83
<table class="table">
84
<tr>
85
<th scope="row">1</th>
86
<td>Michal</td>
87
<td>Szymanski</td>
88
<td>@ascensus_mdb</td>
89
</tr>
90
<tr>
91
<th scope="row">2</th>
92
<td>Dawid</td>
93
<td>Adach</td>
94
<td>@dawidadach</td>
95
</tr>
96
</table>
97
</li>
98
99
</ul>
100
</li>
101
</ul>
102
</div>
103
</th>
104
</tr>
105
106
107
</tbody>
108
</table>
109
110
<!--/ Copy this code to have a working example -->
111
</div>
112
113
</div>
CSS
1
1
JS
1
1
Console errors: 0