Skip to content

Commit

Permalink
fix(DataTable): don't set unique name for each radio input (#14644)
Browse files Browse the repository at this point in the history
* fix(DataTable): don't set unique name for each radio input

* test(DataTable): update snapshots

* fix(DataTable): build with latest icons
  • Loading branch information
tw15egan authored Sep 14, 2023
1 parent 1cb7cd7 commit 47ff517
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/react/src/components/DataTable/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ class DataTable<RowType, ColTypes extends any[]> extends React.Component<
onClick,
]),
id: `${this.getTablePrefix()}__select-row-${row.id}`,
name: `select-row-${row.id}`,
name: `select-row`,
ariaLabel: t(translationKey),
disabled: row.disabled,
radio: this.props.radio || null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ exports[`DataTable behaves as expected selection -- radio buttons should not hav
<input
class="cds--radio-button"
id="data-table-17__select-row-b"
name="select-row-b"
name="select-row"
type="radio"
value=""
/>
Expand Down Expand Up @@ -97,7 +97,7 @@ exports[`DataTable behaves as expected selection -- radio buttons should not hav
<input
class="cds--radio-button"
id="data-table-17__select-row-a"
name="select-row-a"
name="select-row"
type="radio"
value=""
/>
Expand Down Expand Up @@ -133,7 +133,7 @@ exports[`DataTable behaves as expected selection -- radio buttons should not hav
<input
class="cds--radio-button"
id="data-table-17__select-row-c"
name="select-row-c"
name="select-row"
type="radio"
value=""
/>
Expand Down Expand Up @@ -227,7 +227,7 @@ exports[`DataTable behaves as expected selection -- radio buttons should render
<input
class="cds--radio-button"
id="data-table-16__select-row-b"
name="select-row-b"
name="select-row"
type="radio"
value=""
/>
Expand Down Expand Up @@ -263,7 +263,7 @@ exports[`DataTable behaves as expected selection -- radio buttons should render
<input
class="cds--radio-button"
id="data-table-16__select-row-a"
name="select-row-a"
name="select-row"
type="radio"
value=""
/>
Expand Down Expand Up @@ -299,7 +299,7 @@ exports[`DataTable behaves as expected selection -- radio buttons should render
<input
class="cds--radio-button"
id="data-table-16__select-row-c"
name="select-row-c"
name="select-row"
type="radio"
value=""
/>
Expand Down Expand Up @@ -675,7 +675,7 @@ exports[`DataTable behaves as expected selection should render and match snapsho
<input
class="cds--checkbox"
id="data-table-7__select-row-b"
name="select-row-b"
name="select-row"
type="checkbox"
/>
<label
Expand Down Expand Up @@ -707,7 +707,7 @@ exports[`DataTable behaves as expected selection should render and match snapsho
<input
class="cds--checkbox"
id="data-table-7__select-row-a"
name="select-row-a"
name="select-row"
type="checkbox"
/>
<label
Expand Down Expand Up @@ -739,7 +739,7 @@ exports[`DataTable behaves as expected selection should render and match snapsho
<input
class="cds--checkbox"
id="data-table-7__select-row-c"
name="select-row-c"
name="select-row"
type="checkbox"
/>
<label
Expand Down

0 comments on commit 47ff517

Please sign in to comment.