Grafana-UI: Use value for Radio group id (#22568)

This commit is contained in:
Alex Khomenko 2020-03-04 15:31:01 +02:00 committed by GitHub
parent e1af933d4a
commit c5ceae3808
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ export function RadioButtonGroup<T>({
return (
<div className={styles.radioGroup}>
{options.map((o, i) => {
{options.map(o => {
const isItemDisabled = disabledOptions && o.value && disabledOptions.includes(o.value);
return (
<RadioButton
@ -73,7 +73,7 @@ export function RadioButtonGroup<T>({
active={value === o.value}
key={o.label}
onChange={handleOnChange(o)}
id={`option-${i}`}
id={`option-${o.value}`}
name={groupName.current}
>
{o.label}