Closed MarekLacoAXA closed 1 year ago
Hi @MarekLacoAXA The best would if be provide a better type similar to React SyntheticEvent with it's generic.
For now you could cast the target to HTMLInputElement
, or do like preact they have same Problem, see here.
@MarekLacoAXA Would that work for you, for the Start?
export interface AXAChangeEvent<T = HTMLElement> extends InputEvent { target: EventTarget & T; }
You can import now AXAInputTextChangeEvent
in newest release input-text@6.3.1
You can import now
AXAInputTextChangeEvent
in newest release input-text@6.3.1
Thanks Marco for providing solution so quickly! Works great!
onChange
prop type can be improved to better describeevent
argument.Problem:
event: InputEvent
is after recent change too restrictive: it'starget
is nullable and doesn't containvalue
attribute.https://github.com/axa-ch-webhub-cloud/pattern-library/commit/942543d7a50862f55cfe243e05a50ad48e9841c5#diff-5fa5795977e2a41f9937c26c73663c24ae4770a2a4ecaab42e1835c87dfb6a48R29