TreeSelect: Incorrect TypeScript types for filterTemplate options #5102
Labels
Type: Bug
Issue contains a defect related to a specific component.
Typescript
Issue or pull request is *only* related to TypeScript definition
Milestone
Describe the bug
Almost exactly same issue as in #3506 just for TreeSelect.
Function parameter type provided for
filterTemplate
is incorrect.options
object has properties{className, element, filterIconClassName, filterInputChange, filterInputKeyDown, filterOptions, props}
, but it is marked asTreeSelectFilterOptions
that is defined as following:TreeSelectFilterOptions
is matchingfilterOptions
property onoptions
.Reproducer
https://codesandbox.io/p/sandbox/rough-darkness-v5k86h
PrimeReact version
10.0.3 (also encountered it in 9.6.1)
React version
18.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
Chrome 117
Steps to reproduce the behavior
options
andoptions.filterOptions
options
is not of typeTreeSelectFilterOptions
, butoptions.filterOptions
isExpected behavior
options
should be of expected type.The text was updated successfully, but these errors were encountered: