NativeScript / NativeScript/NativeScript

Add event to ListView to know when it is fully loaded and ready to scroll

未關閉
#8,297 1 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

feature list-view
主要語言
TypeScript
星號
25.7k
分支
1.7k
平均合併
1 天 5 小時
30 天內合併 PR
35

描述

Is your feature request related to a problem? Please describe.
If I want to show a ListView and have it start on a certain position, let's say index 4, there is currently no way to know when the ListView is ready to be scrolled. The loaded event fires immediately when the page opens or while the ListView is still loading all the templates. Scrolling while this is happening will not work.

Right now I have to listen to the loaded event of the item template, as well as use a certain timeout of ~200 miliseconds before it's possible to scroll. This is terrible of course.

Describe the solution you'd like
Some event that we can listen on to know when all templates of the ListView are fully initialized and scrolling or any other ListView manipulation is ready to be done. Similar to RadListView which has a DataPopulated event, which may or may not be what we need.

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

先追蹤報告中提到的 ListView loaded 事件和 item-template 初始化流程。將要求的行為與 RadListView 的 DataPopulated 事件進行比較,然後確認新事件只有在範本完全初始化,且捲動或其他 ListView 操作準備就緒時才會觸發。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
typescript
領域
frontend, mobile
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
基本清楚
新手友好度
25/100

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

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