Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit 622ab41

Browse files
committed
make viewValues be parsed. this causes my test to pass
1 parent b5be94f commit 622ab41

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/control-component.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,10 @@ function createControlClass(customControlPropsMap = {}, defaultProps = {}) {
341341
}
342342

343343
setViewValue(viewValue, props = this.props) {
344+
const { parser = (v) => v } = this.props;
345+
344346
if (!isReadOnlyValue(props.controlProps)) {
345-
this.setState({ viewValue });
347+
this.setState({ viewValue: parser(viewValue) });
346348
}
347349
}
348350

0 commit comments

Comments
 (0)