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 Harrin3y ago
that should be the default behaviour for admin panel resources
nitinkaware
nitinkawareOP3y 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
toeknee3y ago
Also check your action. It maybe possible to send two requests very quickly yes, but unlikely.
nitinkaware
nitinkawareOP3y 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...

Did you find this page helpful?