mirror of
https://github.com/strapi/strapi.git
synced 2025-08-05 15:29:04 +00:00
fix bug due to htmlFor in inputenum label
This commit is contained in:
parent
ad754df504
commit
7dc4abfa54
@ -23,13 +23,14 @@ class InputEnum extends React.Component { // eslint-disable-line react/prefer-st
|
|||||||
const isChecked = this.props.value === option.value;
|
const isChecked = this.props.value === option.value;
|
||||||
const active = isChecked ? styles.active : "";
|
const active = isChecked ? styles.active : "";
|
||||||
return (
|
return (
|
||||||
<label className={`btn ${styles.button} ${active}`} key={key} htmlFor={this.props.name}>
|
<label className={`btn ${styles.button} ${active}`} key={key} htmlFor={option.name}>
|
||||||
<FormattedMessage {...{id: option.name}} />
|
<FormattedMessage {...{id: option.name}} />
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
name={this.props.target}
|
name={this.props.target}
|
||||||
id={this.props.name}
|
id={option.name}
|
||||||
checked={isChecked}
|
checked={isChecked}
|
||||||
|
autoComplete="off"
|
||||||
value={option.value}
|
value={option.value}
|
||||||
onChange={this.props.handleChange}
|
onChange={this.props.handleChange}
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user