[Bug]: TypeScript: TableToolbarMenuProps.iconDescription is required #13778
Labels
area: typescript
component: data-table
role: dev 🤖
severity: 3
https://ibm.biz/carbon-severity
type: bug 🐛
Package
@carbon/react
Browser
No response
Package version
1.28.0
React version
No response
Description
When using TableToolbarMenu component in a TypeScript project, the iconDescription prop must be provided:
While it is really a required prop in PropTypes, it does have a default value in defaultProps. Therefore, to keep same usage of this component between JS and TS, it'd be better to make it optional in
TableToolbarMenuProps
and set a default value when destructuring functional component props.Raising this as a bug despite this probably would be covered by #13424, because it actually errors out in real life usage.
Reproduction/example
See below
Steps to reproduce
Simply create use the component in a TypeScript project without any props:
Suggested Severity
None
Application/PAL
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: