How to disable create button when user click on it to prevent duplicate record creation?

Hey guys, is there way to disable create button when user click on it? Sometime the user clicks on it two times and two records gets created.
5 Replies
Dan Harrin
Dan Harrin2y ago
that should be the default behaviour for admin panel resources
nitinkaware
nitinkawareOP2y ago
Ohh yes, it is. Not sure how two records get created when I was trying to do so. It may be possible two fast double clicks triggered two different requests?
toeknee
toeknee2y ago
Also check your action. It maybe possible to send two requests very quickly yes, but unlikely.
nitinkaware
nitinkawareOP2y ago
@toeknee_iom Can you elaborate more on "check your action"? Not sure what it meant?
LeandroFerreira
Are you using a resource or a custom page? wire:loading.attr="disabled" should work...
Want results from more Discord servers?
Add your server