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]: DataTableHeader doesn't have an isSortable property #18172

Open
2 tasks done
adamalston opened this issue Nov 28, 2024 · 0 comments
Open
2 tasks done

[Bug]: DataTableHeader doesn't have an isSortable property #18172

adamalston opened this issue Nov 28, 2024 · 0 comments

Comments

@adamalston
Copy link
Contributor

Package

@carbon/react

Browser

No response

Package version

1.67.1

React version

No response

Description

DataTableHeader doesn't have an isSortable property even though getHeaderProps accepts one. Ideally, the problematic code in the reproduction should be able to simplified like the following:

-  {...getHeaderProps({
-    header,
-    isSortable: header.isSortable,
-  })}
+  {...getHeaderProps({ header })}

I'm not sure whether this issue should be a bug for a missing property or a feature request to add it.

My workaround at the moment is to just ignore the type error. Everything seems to work correctly.

Reproduction/example

https://stackblitz.com/edit/github-anyd1u?file=src%2FApp.tsx

Steps to reproduce

See type error in reproduction.

Suggested Severity

Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.

Application/PAL

DataPower

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants