MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / _parentChanged

Function _parentChanged

packages/core/ui/core/view-base/index.ts:1422–1435  ·  view source on GitHub ↗
(oldParent: ViewBase)

Source from the content-addressed store, hash-verified

1420 }
1421
1422 public _parentChanged(oldParent: ViewBase): void {
1423 const newParent = this.parent;
1424
1425 //Overridden
1426 if (oldParent) {
1427 clearInheritedProperties(this);
1428 if (this.bindingContextBoundToParentBindingContextChanged) {
1429 oldParent.off('bindingContextChange', this.bindingContextChanged, this);
1430 }
1431 } else if (this.shouldAddHandlerToParentBindingContextChanged) {
1432 newParent.on('bindingContextChange', this.bindingContextChanged, this);
1433 this.bindings.get('bindingContext').bind(newParent.bindingContext);
1434 }
1435 }
1436
1437 public onResumeNativeUpdates(): void {
1438 // Apply native setters...

Callers

nothing calls this directly

Calls 5

clearInheritedPropertiesFunction · 0.90
bindMethod · 0.80
offMethod · 0.65
onMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected