Skip to content

Commit

Permalink
fix(Table): remove blank scope in empty deprecated table headers (#10875
Browse files Browse the repository at this point in the history
)

* fix(Table): remove blank scope in empty deprecated table headers

* update snapshots
  • Loading branch information
nicolethoen authored Aug 22, 2024
1 parent 7b64b05 commit 279c54f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ describe('Transformer functions', () => {
});

test('emptyCol', () => {
expect(emptyCol('')).toEqual({ scope: '' });
expect(emptyCol('')).toEqual({ scope: null });
expect(emptyCol('some')).toEqual({});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const scopeColTransformer: ITransform = () => ({
});

export const emptyCol: ITransform = (label: IFormatterValueType) => ({
...(label ? {} : { scope: '' })
...(label ? {} : { scope: null })
});

export const parentId: ITransform = (_value: IFormatterValueType, { rowData }: IExtra) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,6 @@ exports[`Table Collapsible nested table 1`] = `
class="pf-v5-c-table__th"
data-key="0"
data-label=""
scope=""
tabindex="-1"
/>
<th
Expand Down Expand Up @@ -2146,7 +2145,6 @@ exports[`Table Collapsible table 1`] = `
class="pf-v5-c-table__th"
data-key="0"
data-label=""
scope=""
tabindex="-1"
/>
<th
Expand Down Expand Up @@ -4166,7 +4164,6 @@ exports[`Table Selectable table 1`] = `
class="pf-v5-c-table__th pf-v5-c-table__check"
data-key="0"
data-label=""
scope=""
tabindex="-1"
>
<label>
Expand Down Expand Up @@ -4867,7 +4864,6 @@ exports[`Table Selectable table with Radio 1`] = `
class="pf-v5-c-table__th"
data-key="0"
data-label=""
scope=""
tabindex="-1"
/>
<th
Expand Down Expand Up @@ -5560,7 +5556,6 @@ exports[`Table Selectable table with selected expandable row 1`] = `
class="pf-v5-c-table__th pf-v5-c-table__check"
data-key="0"
data-label=""
scope=""
tabindex="-1"
>
<label>
Expand Down Expand Up @@ -10291,7 +10286,6 @@ exports[`Table simple Editable table 1`] = `
class="pf-v5-c-table__th"
data-key="4"
data-label=""
scope=""
tabindex="-1"
/>
</tr>
Expand Down

0 comments on commit 279c54f

Please sign in to comment.