Skip to content

Commit

Permalink
[form-builder] Pass onBlur to underlying string input (#1206)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed Feb 15, 2019
1 parent f5619d0 commit a24ff45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/@sanity/form-builder/src/inputs/StringInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class StringInput extends React.Component<Props> {
}

render() {
const {value, readOnly, type, markers, level, onFocus} = this.props
const {value, readOnly, type, markers, level, onFocus, onBlur} = this.props
const validation = markers.filter(marker => marker.type === 'validation')
const errors = validation.filter(marker => marker.level === 'error')

Expand All @@ -48,6 +48,7 @@ export default class StringInput extends React.Component<Props> {
placeholder={type.placeholder}
onChange={this.handleChange}
onFocus={onFocus}
onBlur={onBlur}
ref={this.setInput}
/>
</FormField>
Expand Down

0 comments on commit a24ff45

Please sign in to comment.