mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Manually applying CSS in removed and now it is done once per cell. (#2174)
* Manually applying CSS in removed and now it is done once per cell. Clearing bindingContext is now done in refresh method instead of preparing cell. Obsolete isScrolling property on ListView. Removed android scroll listener. Added test for nulling cells bindingContext. Uncommented few tests and made them work. Fixed android ListView eachChildView to return the wrapping StackLayout so that Unloading now works as expected. onUnload method in view-common now raise unloaded only if item isLoaded=true. * Fix navigation path
This commit is contained in:
@@ -127,10 +127,10 @@ export class ListView extends view.View implements definition.ListView {
|
||||
}
|
||||
|
||||
get isScrolling(): boolean {
|
||||
return this._getValue(ListView.isScrollingProperty);
|
||||
return false;
|
||||
}
|
||||
set isScrolling(value: boolean) {
|
||||
this._setValue(ListView.isScrollingProperty, value);
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
get separatorColor(): color.Color {
|
||||
@@ -169,12 +169,7 @@ export class ListView extends view.View implements definition.ListView {
|
||||
|
||||
public _prepareItem(item: view.View, index: number) {
|
||||
if (item) {
|
||||
var dataItem = this._getDataItem(index);
|
||||
if (!(dataItem instanceof observable.Observable)) {
|
||||
item.bindingContext = null;
|
||||
}
|
||||
item.bindingContext = dataItem;
|
||||
item._inheritProperties(this);
|
||||
item.bindingContext = this._getDataItem(index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,8 +210,4 @@ export class ListView extends view.View implements definition.ListView {
|
||||
public _onRowHeightPropertyChanged(data: dependencyObservable.PropertyChangeData) {
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
public _propagateInheritableProperties(view: view.View) {
|
||||
// do not get binding context from parent when adding items, since the binding context of the items will be different.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user