File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ import WebformElement from '../WebformElement';
66// styled
77import Input from './styled/input' ;
88
9+ const StyledInputMask = Input . withComponent ( ( { error, ...p } ) => < InputMask { ...p } /> ) ;
10+
911@observer
1012class BaseInput extends Component {
1113 static propTypes = {
@@ -78,7 +80,7 @@ class BaseInput extends Component {
7880
7981 // When there is a mask from Drupal.
8082 if ( this . props . field [ '#mask' ] ) {
81- InputComponent = Input . withComponent ( InputMask ) ; // Use InputMask element instead.
83+ InputComponent = StyledInputMask ; // Use InputMask element instead.
8284 attrs . mask = this . props . field [ '#mask' ] ;
8385 attrs . alwaysShowMask = this . props . field [ '#alwaysShowMask' ] || true ;
8486 }
@@ -90,7 +92,7 @@ class BaseInput extends Component {
9092 name = { this . props . field [ '#webform_key' ] }
9193 id = { this . props . id || this . props . field [ '#webform_key' ] }
9294 placeholder = { this . props . field [ '#placeholder' ] }
93- error = { ( ! this . props . webformElement . isValid ( ) ) . toString ( ) }
95+ error = { ! this . props . webformElement . isValid ( ) }
9496 className = { this . props . className }
9597 min = { this . props . field [ '#min' ] }
9698 max = { this . props . field [ '#max' ] }
You can’t perform that action at this time.
0 commit comments