Skip to content
This repository has been archived by the owner on Aug 6, 2022. It is now read-only.

Commit

Permalink
Fixed keyboard selection for the component pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
sconix committed Jun 16, 2018
1 parent 6a737e2 commit bb6e0b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions example/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class AppComponent {
public disabled: boolean = false;

public config: SwiperConfigInterface = {
a11y: true,
direction: 'horizontal',
slidesPerView: 1,
keyboard: true,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/swiper.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
<div class="swiper-button-prev" [hidden]="swiperConfig?.navigation !== true && swiperConfig?.navigation?.prevEl !== '.swiper-button-prev'" [attr.disabled]="isAtFirst || null"></div>
<div class="swiper-button-next" [hidden]="swiperConfig?.navigation !== true && swiperConfig?.navigation?.nextEl !== '.swiper-button-next'" [attr.disabled]="isAtLast || null"></div>

<div class="swiper-pagination" [hidden]="swiperConfig?.pagination !== true && swiperConfig?.pagination?.el !== '.swiper-pagination'" (click)="directiveRef?.setIndex($event.target.getAttribute('index'))"></div>
<div class="swiper-pagination" [hidden]="swiperConfig?.pagination !== true && swiperConfig?.pagination?.el !== '.swiper-pagination'" (click)="directiveRef?.setIndex($event.target.getAttribute('index'))" (keyup.enter)="directiveRef?.setIndex($event.target.getAttribute('index'))"></div>
</div>

0 comments on commit bb6e0b8

Please sign in to comment.