Skip to content

Commit

Permalink
fix(table): update element tag in sp table sub components
Browse files Browse the repository at this point in the history
  • Loading branch information
Najika Yoo authored and najikahalsema committed Jan 27, 2023
1 parent ff1f15d commit 4e94d70
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/table/src/Table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export class Table extends SizedMixin(SpectrumElement, {
) => TemplateResult = /* c8 ignore next */ () => html``;

@property({ reflect: true })
public role = 'grid';
public override role = 'grid';

/**
* Whether the Table allows users to select a row or rows, and thus controls whether or not the Table also renders checkboxes.
Expand Down
4 changes: 2 additions & 2 deletions packages/table/src/TableBody.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import styles from './table-body.css.js';
import { MutationController } from '@lit-labs/observers/mutation_controller.js';

/**
* @element sp-table
* @element sp-table-body
*/
export class TableBody extends SpectrumElement {
public static override get styles(): CSSResultArray {
Expand Down Expand Up @@ -51,7 +51,7 @@ export class TableBody extends SpectrumElement {
}

@property({ reflect: true })
public role = 'rowgroup';
public override role = 'rowgroup';

protected override render(): TemplateResult {
return html`
Expand Down
4 changes: 2 additions & 2 deletions packages/table/src/TableCell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ import { property } from '@spectrum-web-components/base/src/decorators.js';
import styles from './table-cell.css.js';

/**
* @element sp-table
* @element sp-table-cell
*/
export class TableCell extends SpectrumElement {
public static override get styles(): CSSResultArray {
return [styles];
}

@property({ reflect: true })
public role = 'gridcell';
public override role = 'gridcell';

protected override render(): TemplateResult {
return html`
Expand Down
4 changes: 2 additions & 2 deletions packages/table/src/TableCheckboxCell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ import styles from './table-checkbox-cell.css.js';
import { Checkbox } from '@spectrum-web-components/checkbox';

/**
* @element sp-table
* @element sp-table-checkbox-cell
*/
export class TableCheckboxCell extends SpectrumElement {
public static override get styles(): CSSResultArray {
return [cellStyles, headCellStyles, styles];
}

@property({ reflect: true })
public role = 'gridcell';
public override role = 'gridcell';

@query('.checkbox')
public checkbox!: Checkbox;
Expand Down
4 changes: 2 additions & 2 deletions packages/table/src/TableHead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { TableCheckboxCell } from './TableCheckboxCell.js';
import styles from './table-head.css.js';

/**
* @element sp-table
* @element sp-table-head
*
*/
export class TableHead extends SpectrumElement {
Expand All @@ -31,7 +31,7 @@ export class TableHead extends SpectrumElement {
}

@property({ reflect: true })
public role = 'row';
public override role = 'row';

@property({ type: Boolean, reflect: true })
public selected?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions packages/table/src/TableHeadCell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const ariaSortValue = (sortDirection?: 'asc' | 'desc'): string => {
};

/**
* @element sp-table
* @element sp-table-head-cell
*
* @fires sorted - Announces that the table head has been sorted and handles the sorted event
*/
Expand All @@ -46,7 +46,7 @@ export class TableHeadCell extends SpectrumElement {
}

@property({ reflect: true })
public role = 'columnheader';
public override role = 'columnheader';

@property({ type: Boolean, reflect: true })
public sortable = false;
Expand Down
4 changes: 2 additions & 2 deletions packages/table/src/TableRow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import styles from './table-row.css.js';
import { TableCheckboxCell } from './TableCheckboxCell.js';

/**
* @element sp-table
* @element sp-table-row
*
* @fires sorted - Announces that `selected` of the table row has changed
*/
Expand All @@ -40,7 +40,7 @@ export class TableRow extends SpectrumElement {
checkboxCells!: TableCheckboxCell[];

@property({ reflect: true })
public role = 'row';
public override role = 'row';

@property({ type: Boolean })
public selectable = false;
Expand Down

0 comments on commit 4e94d70

Please sign in to comment.