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

Method update

packages/core/ui/core/bindable/index.ts:199–217  ·  view source on GitHub ↗
(source: any)

Source from the content-addressed store, hash-verified

197 }
198
199 private update(source: any): void {
200 this.clearSource();
201
202 source = this.sourceAsObject(source);
203
204 if (!types.isNullOrUndefined(source)) {
205 // TODO: if oneWay - call target.unbind();
206 this.source = new WeakRef(source);
207 this.sourceOptions = this.resolveOptions(source, this.sourceProperties);
208
209 const sourceValue = this.getSourcePropertyValue();
210 this.updateTarget(sourceValue);
211 this.addPropertyChangeListeners(this.source, this.sourceProperties);
212 } else if (!this.sourceIsBindingContext) {
213 // TODO: if oneWay - call target.unbind();
214 const sourceValue = this.getSourcePropertyValue();
215 this.updateTarget(sourceValue ? sourceValue : source);
216 }
217 }
218
219 public unbind() {
220 const target = this.targetOptions.instance.get();

Callers 15

bindingContextChangedMethod · 0.95
bindMethod · 0.95
updateActionBarMethod · 0.45
onLoadedMethod · 0.45
updateWithWillAppearMethod · 0.45
showActionBarMethod · 0.45
digestMethod · 0.45
signHMACMethod · 0.45
verifyHMACMethod · 0.45
shortHashFunction · 0.45
strategy.spec.tsFile · 0.45

Calls 6

clearSourceMethod · 0.95
sourceAsObjectMethod · 0.95
resolveOptionsMethod · 0.95
updateTargetMethod · 0.95

Tested by

no test coverage detected