Skip to content

Commit

Permalink
feat: improve disabled state for nav
Browse files Browse the repository at this point in the history
  • Loading branch information
pirhoo committed Jul 23, 2024
1 parent 3acb154 commit 48b93b6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ const props = defineProps({
},
occurrences: {
type: Number,
default: null
default: 0
}
})
const disabledPrevious = computed(() => props.activeIndex === 0)
const disabledNext = computed(() => props.activeIndex === props.occurrences || props.occurrences === null)
const disabledPrevious = computed(() => !props.modelValue || props.activeIndex === 0)
const disabledNext = computed(() => !props.modelValue || props.activeIndex === props.occurrences)
</script>

<template>
Expand Down

0 comments on commit 48b93b6

Please sign in to comment.