[SOLVED] How to access the shadowed input html element inside ion-input?


#1

In the source code of ion-input it seems that only a little subset of attributes is passed down to the native input HTML dom element.
Also the nativeInput attribute does not seems exposed.
I tried to reach the ion-input dom element via document.queryselector() and also via @ViewChild/@ViewChildren but in both cases i’m unable to access the “shadowRoot” proprieties that its needed to access the native input element.
Is there any workaround?

I need to add the “List” attribute to the input because i want to use it with a datalist, that’s all.

EDIT:
shadowRoot property seems available in ionViewDidEnter but not in ngAfterViewInit
is that correct? or is there any other callback/promise to know when the shadowRoot gets filled?

SOLVED:
shadowRoot is available using the ionInputDidLoad event