eduardoborges / use-mask-input

✏️ A react Hook for build elegant input masks. Compatible with React Hook Form
https://npmjs.com/package/use-mask-input
336 stars 19 forks source link

Accessing unmasked value from event #60

Open RHarryH opened 1 year ago

RHarryH commented 1 year ago

Does the library support accesing unmasked value from event target? I have put onChange event on form tag to get any form change and event.target.value shows value with mask applied. My workaround to that is the code below but maybe library already allows that without accesing inputmask.

if (target.inputmask) {
    value = target.inputmask.unmaskedvalue()
}