@@ -235,13 +235,10 @@ export class UmbTableElement extends UmbLitElement {
235
235
}
236
236
237
237
override render ( ) {
238
+ const style = ! ( this . config . allowSelection === false && this . config . hideIcon === true ) ? 'width: 60px' : undefined ;
238
239
return html `
239
240
<uui- table class= "uui-text" >
240
- <uui- table-column
241
- .style = ${ when (
242
- ! ( this . config . allowSelection === false && this . config . hideIcon === true ) ,
243
- ( ) => 'width: 60px' ,
244
- ) } > </ uui- table-column>
241
+ <uui- table-column style= ${ ifDefined ( style ) } > </ uui- table-column>
245
242
<uui- table-head>
246
243
${ this . _renderHeaderCheckboxCell ( ) } ${ this . columns . map ( ( column ) => this . _renderHeaderCell ( column ) ) }
247
244
</ uui- table-head>
@@ -274,18 +271,17 @@ export class UmbTableElement extends UmbLitElement {
274
271
275
272
private _renderHeaderCheckboxCell ( ) {
276
273
if ( this . config . hideIcon && ! this . config . allowSelection ) return ;
277
-
278
274
return html `
279
275
<uui- table-head- cell style= "--uui-table-cell-padding: 0; text-align: center;" >
280
276
${ when (
281
277
this . config . allowSelection ,
282
- ( ) =>
283
- html ` <uui- checkbox
284
- label= "Select All"
278
+ ( ) => html `
279
+ <uui- checkbox
280
+ aria - label= ${ this . localize . term ( 'general_selectAll' ) }
285
281
style= "padding: var(--uui-size-4) var(--uui-size-5);"
286
282
@change = "${ this . _handleAllRowsCheckboxChange } "
287
- ?checked= " ${ this . selection . length === this . items . length } " >
288
- < / uui - checkbox > ` ,
283
+ ?checked= ${ this . selection . length === this . items . length } > < / uui - checkbox >
284
+ ` ,
289
285
) }
290
286
</ uui- table-head- cell>
291
287
` ;
@@ -307,9 +303,11 @@ export class UmbTableElement extends UmbLitElement {
307
303
308
304
private _renderRowCheckboxCell ( item : UmbTableItem ) {
309
305
if ( this . sortable === true ) {
310
- return html `<uui- table-cell style= "text-align: center;" >
311
- <uui- icon name= "icon-grip" > </ uui- icon>
312
- </ uui- table-cell> ` ;
306
+ return html `
307
+ <uui- table-cell style= "text-align: center;" >
308
+ <uui- icon name= "icon-grip" > </ uui- icon>
309
+ </ uui- table-cell>
310
+ ` ;
313
311
}
314
312
315
313
if ( this . config . hideIcon && ! this . config . allowSelection ) return ;
@@ -321,11 +319,10 @@ export class UmbTableElement extends UmbLitElement {
321
319
this . config . allowSelection ,
322
320
( ) => html `
323
321
<uui- checkbox
324
- label= "Select Row"
322
+ aria - label= ${ this . localize . term ( 'buttons_select' ) }
325
323
@click = ${ ( e : PointerEvent ) => e . stopPropagation ( ) }
326
324
@change = ${ ( event : Event ) => this . _handleRowCheckboxChange ( event , item ) }
327
- ?checked= "${ this . _isSelected ( item . id ) } " >
328
- </ uui- checkbox>
325
+ ?checked= ${ this . _isSelected ( item . id ) } > </ uui- checkbox>
329
326
` ,
330
327
) }
331
328
</ uui- table-cell>
0 commit comments