I have a navigation link which I want to disable while a server connect is executing. Can I do that?
Here is the link:
<a data-toggle="collapse" data-target=".navbar-collapse.show" class="nav_icons_item nav-item nav-link align-self-center" href="#" id="a_nav_main_crontab" dmx-on:click="test_crontab_commands.load()" ><i class="far fa-clock"></i></a>
So I tried adding:
dmx-bind:disabled="test_crontab_commands.state.executing"
And it doesn’t disable it…
Is there anything else I can try?
could you possibly make the link a hashtag while executing then re bind your actual link not sure if this would work?
@Sorry_Duh, that wouldn’t work as it is executing a server connect on-click
…
Guys, the HTML disabled attribute is not available for anchor tags:
https://www.w3schools.com/tags/att_disabled.asp
You can add a class to it when the server action is being executed. And with that class you can assign: pointer-events: none;
Genius idea @Teodor… works like a dream. Thank you for the input on a Saturday afternoon… much appreciated! 
Wishing you a wonderful weekend,
Antony.
1 Like