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

Function unbind

packages/core/ui/core/view-base/index.ts:924–945  ·  view source on GitHub ↗
(property: string)

Source from the content-addressed store, hash-verified

922 }
923
924 public unbind(property: string): void {
925 const bindings = this.bindings;
926 if (!bindings) {
927 return;
928 }
929
930 const binding = bindings.get(property);
931 if (binding) {
932 binding.unbind();
933 bindings.delete(property);
934 if (binding.sourceIsBindingContext) {
935 if (property === 'bindingContext') {
936 this.shouldAddHandlerToParentBindingContextChanged = false;
937 this.bindingContextBoundToParentBindingContextChanged = false;
938 const parent = this.parent;
939 if (parent) {
940 parent.off('bindingContextChange', this.bindingContextChanged, this);
941 }
942 }
943 }
944 }
945 }
946
947 private performLayout(currentRun = 0) {
948 // if there's an animation in progress we need to delay the layout

Callers

nothing calls this directly

Calls 4

unbindMethod · 0.80
getMethod · 0.65
deleteMethod · 0.65
offMethod · 0.65

Tested by

no test coverage detected