|
124 | 124 | <Shw::Divider /> |
125 | 125 |
|
126 | 126 | <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"> |
128 | 128 | <Hds::AdvancedTable |
129 | 129 | @model={{this.model.music}} |
130 | 130 | @isStriped={{true}} |
| 131 | + @maxHeight="400px" |
| 132 | + @hasStickyHeader={{false}} |
131 | 133 | @columns={{array |
132 | 134 | (hash key="artist" label="Artist" tooltip="More information." isSortable=true) |
133 | 135 | (hash key="album" label="Album" tooltip="More information." isSortable=true) |
|
163 | 165 |
|
164 | 166 | <Shw::Text::H2>Sticky header</Shw::Text::H2> |
165 | 167 |
|
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> |
194 | 194 |
|
195 | 195 | <Shw::Text::H2>Sticky column</Shw::Text::H2> |
196 | 196 |
|
197 | | - <div class="shw-component-advanced-table-fixed-dimensions-wrapper"> |
| 197 | + <div class="shw-component-advanced-table-fixed-width-wrapper"> |
198 | 198 | <Hds::AdvancedTable |
199 | 199 | @isSelectable={{true}} |
200 | 200 | @onSelectionChange={{this.onMultiSelectUsersSelectionChange__demo3}} |
201 | 201 | @model={{this.model.userData}} |
| 202 | + @maxHeight="400px" |
| 203 | + @hasStickyHeader={{false}} |
202 | 204 | @columns={{array |
203 | 205 | (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") |
207 | 209 | }} |
208 | 210 | @hasStickyFirstColumn={{true}} |
209 | 211 | @isStriped={{true}} |
|
225 | 227 |
|
226 | 228 | <Shw::Text::H3>Sticky column not selectable</Shw::Text::H3> |
227 | 229 |
|
228 | | - <div class="shw-component-advanced-table-fixed-dimensions-wrapper"> |
| 230 | + <div class="shw-component-advanced-table-fixed-width-wrapper"> |
229 | 231 | <Hds::AdvancedTable |
230 | 232 | @model={{this.model.userData}} |
231 | 233 | @columns={{array |
232 | 234 | (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") |
236 | 238 | }} |
237 | 239 | @hasStickyFirstColumn={{true}} |
238 | 240 | @isStriped={{true}} |
| 241 | + @maxHeight="400px" |
| 242 | + @hasStickyHeader={{false}} |
239 | 243 | > |
240 | 244 | <:body as |B|> |
241 | 245 | <B.Tr> |
|
257 | 261 | @model={{this.model.userData}} |
258 | 262 | @columns={{array |
259 | 263 | (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") |
263 | 267 | }} |
264 | 268 | @maxHeight="400px" |
265 | 269 | @hasStickyFirstColumn={{true}} |
|
0 commit comments