Skip to content

Commit

Permalink
chore(lib): update Pagination
Browse files Browse the repository at this point in the history
- In `src/components/pagination/PaginationButton.vue`,
    - The `disabled` attribute of the button is replaced with
      `disabledOrUndefined`. On Vue 3, setting a boolean attribute
      `false` does not remove it. To do so, `null` or `undefined` has
      to be returned. `disabledOrUndefined` deals with new behavior.
- Common,
    - Automatic ESLint fix is applied.
  • Loading branch information
kikuomax committed Jul 6, 2023
1 parent 5b103a5 commit 403997b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/pagination/PaginationButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
:is="tag"
role="button"
:href="href"
:disabled="isDisabled"
:disabled="disabledOrUndefined"
class="pagination-link"
:class="{ 'is-current': page.isCurrent, [page.class]: true }"
v-bind="$attrs"
Expand Down Expand Up @@ -41,11 +41,15 @@ export default {
href() {
if (this.tag === 'a') {
return '#'
} else {
return undefined
}
return undefined
},
isDisabled() {
return this.disabled || this.page.disabled
},
disabledOrUndefined() {
return this.isDisabled || undefined
}
}
}
Expand Down

0 comments on commit 403997b

Please sign in to comment.