Commit c5ceae38 by Alex Khomenko Committed by GitHub

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

parent e1af933d
...@@ -64,7 +64,7 @@ export function RadioButtonGroup<T>({ ...@@ -64,7 +64,7 @@ export function RadioButtonGroup<T>({
return ( return (
<div className={styles.radioGroup}> <div className={styles.radioGroup}>
{options.map((o, i) => { {options.map(o => {
const isItemDisabled = disabledOptions && o.value && disabledOptions.includes(o.value); const isItemDisabled = disabledOptions && o.value && disabledOptions.includes(o.value);
return ( return (
<RadioButton <RadioButton
...@@ -73,7 +73,7 @@ export function RadioButtonGroup<T>({ ...@@ -73,7 +73,7 @@ export function RadioButtonGroup<T>({
active={value === o.value} active={value === o.value}
key={o.label} key={o.label}
onChange={handleOnChange(o)} onChange={handleOnChange(o)}
id={`option-${i}`} id={`option-${o.value}`}
name={groupName.current} name={groupName.current}
> >
{o.label} {o.label}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment