I have an angular form, when the focus is on submit button and user press and hold submit button it submits the form multiple times. I can disable the button on submit, but i have multiple forms Is there a best way to handle this globally using angular or html.
Asked
Active
Viewed 90 times
1 Answers
0
It would be useful to apply for debouncing. You can use it easily in js. If you use lodash library it is even easier. Some helpful links;
- https://css-tricks.com/debouncing-throttling-explained-examples/
- https://lodash.com/docs/4.17.15#debounce
On the other hand, there is a similar issue in the following link and it can help you to think in another way. Preventing multiple clicks on button

emredmrcn
- 144
- 1
- 5