[Bug]: Incorrect typings for Filterable Multi Select #16491
Labels
component: filterable-multiselect
severity: 3
User can complete task, and/or has a workaround
type: bug 🐛
Package
@carbon/react
Browser
No response
Package version
v1.57.0
React version
No response
Description
Some optional props were marked as required in the ts migration for the FilterableMultiSelect component. This causes some problems, we are required to declare unused props and override functions we do not want to override. And not doing it, we have
tsc build
issues (and end up using ts-ignore to avoid it 😄).In FilterableMultiSelect.tsx,
filterItems
should be optional (so we can use the default Sorter):Also, it extends SortingPropTypes (which also has wrong required props) when it should be extending MultiSelectSortingProps. This causes
compareItems
andsortItems
to be required. Also, it requires ItemType to extend { disabled?: boolean }, which seems incorrect.Reproduction/example
Tsx related, templates are jsx
Steps to reproduce
Declare FilterableMultiSelect in a tsx file and do not declare
filterItems
,compareItems
orsortItems
.Suggested Severity
Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.
Application/PAL
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: