Added missing inline error for 'source' field.

This commit is contained in:
orangemug
2020-04-13 09:10:30 +01:00
parent 0858a16ffc
commit 090a26bb40
3 changed files with 24 additions and 3 deletions

View File

@@ -168,7 +168,7 @@ export default class LayerEditor extends React.Component {
)}
/>
{this.props.layer.type !== 'background' && <LayerSourceBlock
error={errorData.sources}
error={errorData.source}
sourceIds={Object.keys(this.props.sources)}
value={this.props.layer.source}
onChange={v => this.changeProperty(null, 'source', v)}

View File

@@ -11,6 +11,7 @@ class LayerSourceBlock extends React.Component {
wdKey: PropTypes.string,
onChange: PropTypes.func,
sourceIds: PropTypes.array,
error: PropTypes.object,
}
static defaultProps = {
@@ -19,7 +20,10 @@ class LayerSourceBlock extends React.Component {
}
render() {
return <InputBlock label={"Source"} fieldSpec={latest.layer.source}
return <InputBlock
label={"Source"}
fieldSpec={latest.layer.source}
error={this.props.error}
data-wd-key={this.props.wdKey}
>
<AutocompleteInput