Open sydneyjodon-wk opened 1 month ago
The onHighlightChange
should only trigger when the highlighted option changes, not when the listbox opens. This seems to be a broader issue, as mentioned in #31383. Instead of changing the type, we should update the overall implementation. The types are correct that the event
should always be present.
Steps to reproduce
Link to live example: https://stackblitz.com/edit/react-d4b5ls?file=Demo.tsx
Steps:
onHighlightChange
propevent
paramCurrent behavior
Hello 👋
I'm noticing that the
onHighlightChange
is typed as:with a non-null
event
param, butundefined
seems to be coming through for the param. See demo:Expected behavior
Would it be possible to change the typing of the prop to reflect the values that are being passed to
event
?This seems like it would be consistent with some other onHighlightChange props.
Context
We are trying to use strict null safety
Your environment
See codesandbox link
Search keywords: onHighlightChange, undefined event