mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-24 12:17:05 -08:00
Fix button disabling
This commit is contained in:
parent
a4b93d4bbd
commit
7108156072
|
@ -318,19 +318,19 @@
|
|||
<div class="l2fd-buttonbar" style="grid-area: options-buttons">
|
||||
<button
|
||||
x-on:click.prevent="if(!$event.target.classList.contains('disabled')) shiftSelectedOption(-1)"
|
||||
x-bind:class="{ 'disabled': !selectedOption || selectedOptionIndex == 0 }"
|
||||
x-bind:class="{ 'disabled': !selectedField || !selectedOption || selectedOptionIndex == 0 }"
|
||||
><i class="fa-solid fa-caret-up"></i></button>
|
||||
<button
|
||||
x-on:click.prevent="if(!$event.target.classList.contains('disabled')) shiftSelectedOption(+1)"
|
||||
x-bind:class="{ 'disabled': !selectedOption || selectedOptionIndex == selectedField.options.length - 1 }"
|
||||
x-bind:class="{ 'disabled': !selectedField || !selectedOption || selectedOptionIndex == selectedField.options.length - 1 }"
|
||||
><i class="fa-solid fa-caret-down"></i></button>
|
||||
<button
|
||||
x-on:click.prevent="if(!$event.target.classList.contains('disabled')) addOption()"
|
||||
x-bind:class="{}"
|
||||
x-bind:class="{ 'disabled': !selectedField }"
|
||||
><i class="fa-solid fa-plus"></i></button>
|
||||
<button
|
||||
x-on:click.prevent="if(!$event.target.classList.contains('disabled')) trashSelectedOption()"
|
||||
x-bind:class="{ 'disabled': !selectedOption }"
|
||||
x-bind:class="{ 'disabled': !selectedField || !selectedOption }"
|
||||
><i class="fa-solid fa-trash"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue