Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: TableExpandRow throws an error for more required props #16438

Open
2 tasks done
AlvinChacko opened this issue May 10, 2024 · 0 comments
Open
2 tasks done

[Bug]: TableExpandRow throws an error for more required props #16438

AlvinChacko opened this issue May 10, 2024 · 0 comments
Labels
area: typescript severity: 3 User can complete task, and/or has a workaround type: bug 🐛

Comments

@AlvinChacko
Copy link

Package

@carbon/react

Browser

Firefox

Package version

v1.52

React version

v16.12.0

Description

When adding the TableExpandRow in a ts file like the example provided with getRowProps it still requires more required props.

 <TableExpandRow { ...getRowProps({row}) } >

Error:

Type '{ children: (Element | Element[])[]; ariaLabel: string; "aria-label": string; disabled: boolean; isExpanded?: boolean; isSelected?: boolean; key: string; onExpand: (e: MouseEvent) => void; }' is not assignable to type 'TableExpandRowProps'.

It happens to multiple components in the TS file configuration. Check the stackblitz for an example.

Reproduction/example

https://stackblitz.com/edit/github-zacbic?file=src%2FApp.tsx&preset=node=

Steps to reproduce

Just create a TS file and import the DataTable and the require components.
Render the table with TableExpandRow and the error will be shown

Suggested Severity

None

Application/PAL

No response

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: typescript severity: 3 User can complete task, and/or has a workaround type: bug 🐛
Projects
Status: ⏱ Backlog
Status: Todo
Development

No branches or pull requests

2 participants