From b139c8d01c6d7f8196f085cb69e95e6de196e70d Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sun, 29 Oct 2017 22:16:46 -0600 Subject: [PATCH] Generate unique IDs for SettingsCheckbox Signed-off-by: Travis Ralston --- src/components/views/elements/SettingsCheckbox.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/elements/SettingsCheckbox.js b/src/components/views/elements/SettingsCheckbox.js index cf57fe46ea..f66dee73d0 100644 --- a/src/components/views/elements/SettingsCheckbox.js +++ b/src/components/views/elements/SettingsCheckbox.js @@ -47,16 +47,16 @@ module.exports = React.createClass({ if (!label) label = SettingsStore.getDisplayName(this.props.name, this.props.level); else label = _t(label); - let id = this.props.name; + // We generate a relatively complex ID to avoid conflicts + const id = this.props.name + "_" + this.props.group + "_" + this.props.value + "_" + this.props.level; let checkbox = ( - ); if (this.props.group) { - id = this.props.group + '_' + this.props.name; checkbox = (