eduardoborges / use-mask-input

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

Accessing unmasked value from event #60

Open RHarryH opened 11 months ago

RHarryH commented 11 months 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()
}