mirror of
https://github.com/openharmony/ace_engine_lite.git
synced 2026-07-20 05:43:59 -04:00
issueNo: I4DRLI
Description: fix the bug of list component. Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: youzhi92 <chenyouzhi@huawei.com> Change-Id: I0153c94f8319f02d923f5f69ca34c48f412c4748
This commit is contained in:
@@ -138,7 +138,10 @@ void ListComponent::OnViewAttached()
|
||||
adapter_.UpdateContentAlignParam(listParameter);
|
||||
adapter_.SetDirection(list_.GetDirection());
|
||||
// Step4. add children to list dynamically.
|
||||
list_.SetAdapter(&adapter_);
|
||||
if (!hasSetAdaptor_) {
|
||||
list_.SetAdapter(&adapter_);
|
||||
hasSetAdaptor_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool ListComponent::UpdateForView()
|
||||
|
||||
@@ -43,6 +43,7 @@ private:
|
||||
UIList list_;
|
||||
ListAdapter adapter_;
|
||||
ListEventListener listEventListener_;
|
||||
bool hasSetAdaptor_ = false;
|
||||
static const char * const FUNC_SCROLLTO;
|
||||
static const char * const INDEX_SCROLLTO;
|
||||
static JSValue ListScrollTo(const JSValue func, const JSValue dom, const JSValue args[], const jerry_length_t size);
|
||||
|
||||
Reference in New Issue
Block a user