Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
fixes change events for Radios with shared ids
Browse files Browse the repository at this point in the history
  • Loading branch information
davelandry committed Mar 1, 2017
1 parent 468a411 commit 18db1f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Radio.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ export default class Radio extends BaseClass {

radios = radios.enter().append("label")
.attr("class", "d3plus-Label")
.attr("for", (d, i) => this._value(d, i))
.attr("for", (d, i) => `${this._uuid}-${this._value(d, i)}`)
.each(function(d, i) {
const input = document.createElement("input");
input.setAttribute("type", "radio");
input.setAttribute("name", `d3plus-Radio-${that._uuid}`);
input.setAttribute("id", that._value(d, i));
input.setAttribute("id", `${that._uuid}-${that._value(d, i)}`);
input.setAttribute("value", that._value(d, i));
this.parentNode.insertBefore(input, this.nextSibling);
})
Expand Down

0 comments on commit 18db1f1

Please sign in to comment.