Skip to content

Commit 1dd1c8a

Browse files
author
shleewhite
committed
fix: cleanup showcase
1 parent ba081cf commit 1dd1c8a

File tree

2 files changed

+44
-45
lines changed

2 files changed

+44
-45
lines changed

showcase/app/styles/showcase-pages/advanced-table.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ body.components-advanced-table {
3333
width: 400px;
3434
}
3535

36-
.shw-component-advanced-table-fixed-dimensions-wrapper {
37-
width: 400px;
38-
height: 400px;
39-
}
40-
4136
.shw-component-advanced-table-with-pagination-demo-wrapper {
4237
.hds-table + .hds-pagination {
4338
margin-top: 16px;

showcase/app/templates/components/advanced-table.hbs

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,12 @@
124124
<Shw::Divider />
125125

126126
<Shw::Text::H2>Horizontal scrolling indicators</Shw::Text::H2>
127-
<div class="shw-component-advanced-table-fixed-dimensions-wrapper">
127+
<div class="shw-component-advanced-table-fixed-width-wrapper">
128128
<Hds::AdvancedTable
129129
@model={{this.model.music}}
130130
@isStriped={{true}}
131+
@maxHeight="400px"
132+
@hasStickyHeader={{false}}
131133
@columns={{array
132134
(hash key="artist" label="Artist" tooltip="More information." isSortable=true)
133135
(hash key="album" label="Album" tooltip="More information." isSortable=true)
@@ -163,47 +165,47 @@
163165

164166
<Shw::Text::H2>Sticky header</Shw::Text::H2>
165167

166-
<div class="shw-component-advanced-table-fixed-height-wrapper">
167-
<Hds::AdvancedTable
168-
@isSelectable={{true}}
169-
@onSelectionChange={{this.onMultiSelectUsersSelectionChange__demo3}}
170-
@model={{this.model.userData}}
171-
@columns={{array
172-
(hash key="id" label="ID" width="auto")
173-
(hash key="name" label="Name")
174-
(hash key="email" label="Email")
175-
(hash key="role" label="Role")
176-
}}
177-
@maxHeight="400px"
178-
@isStriped={{true}}
179-
>
180-
<:body as |B|>
181-
<B.Tr
182-
@selectionKey={{B.data.id}}
183-
@isSelected={{B.data.isSelected}}
184-
@selectionAriaLabelSuffix="row #{{B.data.id}}"
185-
>
186-
<B.Td>{{B.data.id}}</B.Td>
187-
<B.Td>{{B.data.name}}</B.Td>
188-
<B.Td>{{B.data.email}}</B.Td>
189-
<B.Td>{{B.data.role}}</B.Td>
190-
</B.Tr>
191-
</:body>
192-
</Hds::AdvancedTable>
193-
</div>
168+
<Hds::AdvancedTable
169+
@isSelectable={{true}}
170+
@onSelectionChange={{this.onMultiSelectUsersSelectionChange__demo3}}
171+
@model={{this.model.userData}}
172+
@columns={{array
173+
(hash key="id" label="ID" width="auto")
174+
(hash key="name" label="Name")
175+
(hash key="email" label="Email")
176+
(hash key="role" label="Role")
177+
}}
178+
@maxHeight="400px"
179+
@isStriped={{true}}
180+
>
181+
<:body as |B|>
182+
<B.Tr
183+
@selectionKey={{B.data.id}}
184+
@isSelected={{B.data.isSelected}}
185+
@selectionAriaLabelSuffix="row #{{B.data.id}}"
186+
>
187+
<B.Td>{{B.data.id}}</B.Td>
188+
<B.Td>{{B.data.name}}</B.Td>
189+
<B.Td>{{B.data.email}}</B.Td>
190+
<B.Td>{{B.data.role}}</B.Td>
191+
</B.Tr>
192+
</:body>
193+
</Hds::AdvancedTable>
194194

195195
<Shw::Text::H2>Sticky column</Shw::Text::H2>
196196

197-
<div class="shw-component-advanced-table-fixed-dimensions-wrapper">
197+
<div class="shw-component-advanced-table-fixed-width-wrapper">
198198
<Hds::AdvancedTable
199199
@isSelectable={{true}}
200200
@onSelectionChange={{this.onMultiSelectUsersSelectionChange__demo3}}
201201
@model={{this.model.userData}}
202+
@maxHeight="400px"
203+
@hasStickyHeader={{false}}
202204
@columns={{array
203205
(hash key="id" label="ID" width="auto")
204-
(hash key="name" label="Name")
205-
(hash key="email" label="Email")
206-
(hash key="role" label="Role")
206+
(hash key="name" label="Name" width="max-content")
207+
(hash key="email" label="Email" width="max-content")
208+
(hash key="role" label="Role" width="max-content")
207209
}}
208210
@hasStickyFirstColumn={{true}}
209211
@isStriped={{true}}
@@ -225,17 +227,19 @@
225227

226228
<Shw::Text::H3>Sticky column not selectable</Shw::Text::H3>
227229

228-
<div class="shw-component-advanced-table-fixed-dimensions-wrapper">
230+
<div class="shw-component-advanced-table-fixed-width-wrapper">
229231
<Hds::AdvancedTable
230232
@model={{this.model.userData}}
231233
@columns={{array
232234
(hash key="id" label="ID" width="auto")
233-
(hash key="name" label="Name")
234-
(hash key="email" label="Email")
235-
(hash key="role" label="Role")
235+
(hash key="name" label="Name" width="max-content")
236+
(hash key="email" label="Email" width="max-content")
237+
(hash key="role" label="Role" width="max-content")
236238
}}
237239
@hasStickyFirstColumn={{true}}
238240
@isStriped={{true}}
241+
@maxHeight="400px"
242+
@hasStickyHeader={{false}}
239243
>
240244
<:body as |B|>
241245
<B.Tr>
@@ -257,9 +261,9 @@
257261
@model={{this.model.userData}}
258262
@columns={{array
259263
(hash key="id" label="ID" width="auto")
260-
(hash key="name" label="Name")
261-
(hash key="email" label="Email")
262-
(hash key="role" label="Role")
264+
(hash key="name" label="Name" width="max-content")
265+
(hash key="email" label="Email" width="max-content")
266+
(hash key="role" label="Role" width="max-content")
263267
}}
264268
@maxHeight="400px"
265269
@hasStickyFirstColumn={{true}}

0 commit comments

Comments
 (0)