Add horizontal scroll to table
This commit is contained in:
parent
95457b2bab
commit
afa8c43c2b
1 changed files with 31 additions and 29 deletions
|
|
@ -1,33 +1,35 @@
|
|||
<table class='royal-table' ...attributes>
|
||||
{{#if @caption}}
|
||||
<caption>
|
||||
{{@caption}}
|
||||
</caption>
|
||||
{{/if}}
|
||||
<thead>
|
||||
<tr>
|
||||
{{yield
|
||||
(component
|
||||
'royal-table/column'
|
||||
place='head'
|
||||
onClickHead=@onClickHead
|
||||
onSort=@onSort
|
||||
sortingProp=@sortingProp
|
||||
sortingIconComponent=@sortingIconComponent
|
||||
parent=this
|
||||
)
|
||||
}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each @data as |item index|}}
|
||||
<div class='max-w-screen overflow-x-auto'>
|
||||
<table class='royal-table' ...attributes>
|
||||
{{#if @caption}}
|
||||
<caption>
|
||||
{{@caption}}
|
||||
</caption>
|
||||
{{/if}}
|
||||
<thead>
|
||||
<tr>
|
||||
{{yield
|
||||
(component 'royal-table/column' place='body' data=item parent=this)
|
||||
item
|
||||
index
|
||||
(component
|
||||
'royal-table/column'
|
||||
place='head'
|
||||
onClickHead=@onClickHead
|
||||
onSort=@onSort
|
||||
sortingProp=@sortingProp
|
||||
sortingIconComponent=@sortingIconComponent
|
||||
parent=this
|
||||
)
|
||||
}}
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each @data as |item index|}}
|
||||
<tr>
|
||||
{{yield
|
||||
(component 'royal-table/column' place='body' data=item parent=this)
|
||||
item
|
||||
index
|
||||
}}
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue