You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -791,6 +791,33 @@ For example, if your component renders a text input, it should be included in th
791
791
})
792
792
```
793
793
794
+
You'll also need to add your component's type to the value accessor's type definitions. For example, in the `TextValueAccessorDirective`, you would add your component's type to the `_handleInputEvent` method:
If your component needs special handling for value changes, you'll also need to update the `registerOnChange`method. For example, if your component needs to handle numeric values:
807
+
808
+
```diff
809
+
registerOnChange(fn: (_: number | null) => void): void {
810
+
- if (this.el.nativeElement.tagName === 'ION-INPUT' || this.el.nativeElement.tagName === 'ION-INPUT-OTP') {
For standalone components, create a directive in the [standalone package](/packages/angular/standalone/src/directives). Look at the implementation of the most similar existing component as a reference:
0 commit comments