checkboxElement in MultiSelectPanelHeaderTemplateEvent has wrong interface #7622
Labels
Typescript
Issue or pull request is *only* related to TypeScript definition
Milestone
Describe the bug
When customizing the
panelHeaderTemplate
of the MultiSelect, I encountered an issue where thecheckboxElement
is of typeHTMLElement
, which prevents me from using it directly.I tried the following code:
This resulted in the error:
Type 'HTMLElement' is not assignable to type 'string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | null | undefined'.
Upon reviewing the interface, I noticed that both
filterElement
andcloseElement
are of typeJSX.Element
, whilecheckboxElement
is the only one designated asHTMLElement
. I believe this may be a mistake, as the following workaround compiles successfully:Thus, I suggest that the type of
checkboxElement
should be changed toJSX.Element
.I will open a PR with the proposed fix.
Reproducer
https://stackblitz.com/edit/xviihaga?file=src%2FApp.tsx
System Information
Steps to reproduce the behavior
No response
Expected behavior
No response
The text was updated successfully, but these errors were encountered: