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
Is your feature request related to a problem? Please describe.
I'd like to know what to use as type for the on:input and on:change callbacks in a number Textfield.
Describe the solution you'd like
A clear documentation in the Textfield demo components would be good.
Describe alternatives you've considered
What i already tried is CustomEvent<any> as well as a self defined type
but this was put together from something i read on Stackoverflow and i wonder if there is something official?
CustomEvent<any> does have target: EventTarget | null so i would have to check for target to be non-nullsy. And even then i get the hint Property 'value' does not exist on type 'EventTarget'. This seems a bit cumbersome to me.
Additional context
I am still using SMUI@7 and Svelte@4, but the question is more universal i think.
The text was updated successfully, but these errors were encountered:
You'll have to use a ’CustomEvent & InputEvent’ workaround. SMUI 8 with Svelte 5 doesn't need it anymore, but older versions do. There's a demo on the website somewhere. I can't remember where. But also the website is updated for v8, so it would only be available on the v7 branch.
Is your feature request related to a problem? Please describe.
I'd like to know what to use as type for the on:input and on:change callbacks in a number Textfield.
Describe the solution you'd like
A clear documentation in the Textfield demo components would be good.
Describe alternatives you've considered
What i already tried is
CustomEvent<any>
as well as a self defined typebut this was put together from something i read on Stackoverflow and i wonder if there is something official?
CustomEvent<any>
does havetarget: EventTarget | null
so i would have to check fortarget
to be non-nullsy. And even then i get the hintProperty 'value' does not exist on type 'EventTarget'
. This seems a bit cumbersome to me.Additional context
I am still using SMUI@7 and Svelte@4, but the question is more universal i think.
The text was updated successfully, but these errors were encountered: