MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / emitValueChange

Method emitValueChange

core/src/components/input/input.tsx:535–542  ·  view source on GitHub ↗

* Emits an `ionChange` event. * * This API should be called for user committed changes. * This API should not be used for external value changes.

(event?: Event)

Source from the content-addressed store, hash-verified

533 * This API should not be used for external value changes.
534 */
535 private emitValueChange(event?: Event) {
536 const { value } = this;
537 // Checks for both null and undefined values
538 const newValue = value == null ? value : value.toString();
539 // Emitting a value change should update the internal state for tracking the focused value
540 this.focusedValue = newValue;
541 this.ionChange.emit({ value: newValue, event });
542 }
543
544 /**
545 * Emits an `ionInput` event.

Callers 1

InputClass · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected