feat:add clearNode when reset listview's renderItem
This commit is contained in:
parent
8d582e3371
commit
bdabde2f56
@ -78,6 +78,10 @@ public abstract class SuperNode<V extends View> extends ViewNode<V> {
|
||||
subNodes.put(id, model);
|
||||
}
|
||||
|
||||
public void clearSubModel() {
|
||||
subNodes.clear();
|
||||
}
|
||||
|
||||
protected abstract void blendSubNode(JSObject subProperties);
|
||||
|
||||
protected void blendSubLayoutConfig(ViewNode viewNode, JSObject jsObject) {
|
||||
|
@ -45,7 +45,7 @@ public class ListAdapter extends RecyclerView.Adapter<ListAdapter.DoricViewHolde
|
||||
int batchCount = 15;
|
||||
SparseArray<String> itemValues = new SparseArray<>();
|
||||
|
||||
public ListAdapter(ListNode listNode) {
|
||||
ListAdapter(ListNode listNode) {
|
||||
this.listNode = listNode;
|
||||
}
|
||||
|
||||
|
@ -76,6 +76,7 @@ public class ListNode extends SuperNode<RecyclerView> {
|
||||
this.listAdapter.renderItemFuncId = prop.asString().value();
|
||||
// If reset renderItem,should reset native cache.
|
||||
this.listAdapter.itemValues.clear();
|
||||
clearSubModel();
|
||||
break;
|
||||
case "batchCount":
|
||||
this.listAdapter.batchCount = 15;
|
||||
|
Reference in New Issue
Block a user