Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mgoldberg524
Copy link

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.

@iamdustan
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants