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
Hi, tried this library with the nuxt3 framework, and got an error:
Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
Type 'null' is not assignable to type 'HTMLElement'.ts(2322)
np-select.d.ts(85, 2): The expected type comes from property 'root' which is declared here on type 'NpCitySelectConfig'
Hi @a1tem, sorry for the late reply, this error is not library related as document.querySelector returns HTMLElement | null, you need to add ! sign to tell typescript that the element is not null, also as I see it you need to move this code to onMounted hook and make this component client only, so the final code should look something like:
Hi, tried this library with the nuxt3 framework, and got an error:
Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
Type 'null' is not assignable to type 'HTMLElement'.ts(2322)
np-select.d.ts(85, 2): The expected type comes from property 'root' which is declared here on type 'NpCitySelectConfig'
Any ideas on how to fix this?
The text was updated successfully, but these errors were encountered: