adopted-ember-addons / adopted-ember-addons/ember-impagination

README does not explain how to trigger the first fetch

Aberta
#170 4 comentários 0 reações 0 responsáveis Ver no GitHub
documentation
Linguagem predominante
JavaScript
Estrelas
123
Forks
12
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

From the README, it is unclear that we need to _explicitly_ trigger the first fetch. The readme says "This setup will immediatly call fetch twice (for records 0-4 [page 0] and records 5-9 [page 1])"... but actually it won't.

I think the solution is to add
```
on-init=(action 'initializeReadOffset')
```
to the template, and an implementation of `initializeReadOffset` that just does this:
`dataset.setReadOffset(0);`

Sound right? If so, I'll make a PR.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.