insin / insin/react-maskedinput

Add unmasked value to onchange event and support controlled input with this value

Open
#99 0 comments 6 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
727
Forks
191
PR merge metrics
No merged PRs in 30d

Description

I tried getting rawValue but cursor position is reseted and the input is not updated
Basically I want this simplified code to work:
```
export class MaskedInput3 extends React.Component {
constructor(props?, context?) {
super(props, context);
this.state = { value: this.props.value }
}

render() {
return ;
}

onChange = (event, unmaskedValue, maskedValue) => {
this.setState({ value: unmaskedValue });
}
}

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.