Skip to content

Commit

Permalink
Fixes UI to hide buttons when only 1 option is displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
latin-panda committed Jan 28, 2025
1 parent 262b28f commit c51f1ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/web-forms/src/components/controls/RankControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ const swapItems = (index: number, newPosition: number) => {

<div class="rank-buttons">
<button
v-if="options.length > 1"
:disabled="index === 0"
@click="moveUp(index)"
@mousedown="setHighlight(index)"
Expand All @@ -142,6 +143,7 @@ const swapItems = (index: number, newPosition: number) => {
</button>

<button
v-if="options.length > 1"
:disabled="index === options.length - 1"
@click="moveDown(index)"
@mousedown="setHighlight(index)"
Expand Down

0 comments on commit c51f1ac

Please sign in to comment.