Fix key prop when rendering options (#38595)

This commit is contained in:
Alex Khomenko 2021-08-30 07:59:51 +03:00 committed by GitHub
parent b248c119ef
commit d90c822e69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,14 +61,8 @@ export class VariableOptions extends PureComponent<Props> {
const highlightClass = index === highlightIndex ? `${selectClass} highlighted` : selectClass; const highlightClass = index === highlightIndex ? `${selectClass} highlighted` : selectClass;
return ( return (
<li> <li key={`${option.value}`}>
<a <a role="checkbox" aria-checked={option.selected} className={highlightClass} onClick={this.onToggle(option)}>
key={`${option.value}`}
role="checkbox"
aria-checked={option.selected}
className={highlightClass}
onClick={this.onToggle(option)}
>
<span className="variable-option-icon"></span> <span className="variable-option-icon"></span>
<span data-testid={selectors.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts(`${option.text}`)}> <span data-testid={selectors.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts(`${option.text}`)}>
{option.text} {option.text}