react-maskedinput icon indicating copy to clipboard operation
react-maskedinput copied to clipboard

Allow onChange prop to take the component's internal InputMask as an argument

Open mgoldberg524 opened this issue 10 years ago • 1 comments

It might be helpful to be able to access the component's internal InputMask property as an argument to the onChange handler passed down through props.

For example, one might desire to call mask.getRawValue() from within the handler as the formatting provided by the component might only be needed for display purposes rather than for storage.

mgoldberg524 avatar Jul 17 '15 15:07 mgoldberg524

Thanks @mgoldberg524. Does this still solve a problem you were having? I would like to keep the on* APIs completely analogous with a React Event if possible.

What alternative approaches could allow the consumer access to the raw value as well?

iamdustan avatar Feb 11 '16 14:02 iamdustan