You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I render my dom elements optionally I have deteced that useIMask hook can't add event listener to my input.
To Reproduce
You can see this error on reactplayground. IMask on input works correctly but it doesn't update IMask value since there is no accept and complete event on my input. When dom loads IMask
this hook above triggers once but imask.ref is empty so it can't attach event listeners, then on second render(when isLoading state setted to false on my playground code) this hook never triggers again.
Expected behavior
A clear and concise description of what you expected to happen.
Environment:
OS: [macOS]
Browser: [chrome]
Version: [128.0.6613.138]
IMask version: [7.6.1]
Framework/plugin version : [React 18.2.0]
Additional context
I have fixed this issue by updating this dependency hook:
I can open a PR for this if you agree that this is a bug.
The text was updated successfully, but these errors were encountered:
baran-ozer
changed the title
useIMask dooes't add event listener accept & complete on some cases
useIMask doesn't add event listener accept & complete on some cases
Sep 20, 2024
Describe the bug
When I render my dom elements optionally I have deteced that useIMask hook can't add event listener to my input.
To Reproduce
You can see this error on reactplayground. IMask on input works correctly but it doesn't update IMask value since there is no accept and complete event on my input. When dom loads IMask
imaskjs/packages/react-imask/src/hook.ts
Lines 142 to 154 in d1fe83e
Expected behavior
A clear and concise description of what you expected to happen.
Environment:
Additional context
I have fixed this issue by updating this dependency hook:
imaskjs/packages/react-imask/src/hook.ts
Lines 142 to 154 in d1fe83e
I can open a PR for this if you agree that this is a bug.
The text was updated successfully, but these errors were encountered: