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

README does not explain how to trigger the first fetch

未關閉
#170 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
documentation
主要語言
JavaScript
星號
123
分支
12
PR 合併指標
30 天內沒有已合併 PR

描述

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.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。