Hello,
I’m trying to use a handler for an input field but can’t figure out how to type it:
const onInput = (e: React.ChangeEvent<HTMLInputElement>) => {
}
<s-search-field onInput={ onInput } />
App bridge types is complaining:

It tried all kind of combination but could not find how to properly type those callbacks.
Thanks.
Alan_G
2
Hey again @bakura10 
Can you try the below: const onInput: (e: CallbackEvent<'s-search-field', Event>) => void = (e) => { setQuery(e.currentTarget.value); }
If that doesn’t work, just let me know and I’m happy to dig further into this.
2 Likes
Thanks a lot @Alan_G ! It seems to work. I did not realize the CallbackEvent was actually exported :).
1 Like
Alan_G
4
No worries @bakura10 - glad I could help with this one!