Skip to content

Commit

Permalink
A minor cleanup (rjsf-team#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
glasserc authored and edi9999 committed Jun 28, 2018
1 parent 9e4693a commit 96f43be
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/widgets/BaseInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function BaseInput(props) {
schema,
formContext,
registry,
rawErrors,
...inputProps
} = props;

Expand All @@ -27,16 +28,14 @@ function BaseInput(props) {
return props.onChange(value === "" ? options.emptyValue : value);
};

const { rawErrors, ...cleanProps } = inputProps;

return (
<input
className="form-control"
readOnly={readonly}
disabled={disabled}
autoFocus={autofocus}
value={value == null ? "" : value}
{...cleanProps}
{...inputProps}
onChange={_onChange}
onBlur={onBlur && (event => onBlur(inputProps.id, event.target.value))}
onFocus={onFocus && (event => onFocus(inputProps.id, event.target.value))}
Expand Down

0 comments on commit 96f43be

Please sign in to comment.