reactjs - How Can I Mask My Material-UI TextField? -
i have textfield phone numbers in short form. , want mask form field (0)xxx xxx xx xx.
i'm trying use react-input-mask plugin material-ui. if want change input value, not updating main textfield.
<textfield ref="phone" name="phone" type="text" value={this.state.phone} onchange={this.onchange} > <inputmask value={this.state.phone} onchange={this.onchange} mask="(0)999 999 99 99" maskchar=" " /> </textfield>
actually, couldn't find documentation masking material-ui. i'm trying figure out how can use plugins.
this should trick:
<textfield ref="phone" name="phone" type="text" value={this.state.phone} onchange={this.onchange} > <inputmask mask="(0)999 999 99 99" maskchar=" " /> </textfield>
Comments
Post a Comment