Inversion : ne pas afficher de <select> quand une seule entrée possible

pull/138/head
mama 2017-11-20 10:17:12 +01:00
parent aca964fd9c
commit 1bf964ada8
2 changed files with 9 additions and 0 deletions

View File

@ -87,6 +87,10 @@ export default class Input extends Component {
let { stepProps: { inversions } } = this.props
if (!inversions) return null
if (inversions.length === 1) return (
<span className="inputPrefix">{inversions[0].title || inversions[0].name}</span>
)
return (
<select
defaultValue={inversions[0].dottedName}

View File

@ -287,6 +287,11 @@ fieldset > .ignore {
outline: none;
}
.step .inputPrefix {
margin: 0 1em;
font-weight: 600;
}
.step .inputSuggestions {
font-style: italic;
float: right;