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

bigint support for GridRowId #9804

Closed
wants to merge 1 commit into from
Closed

Conversation

pmoghaddam
Copy link

I am raising this for your attention. It seems like a simple fix, but not sure if I am missing anything. If you got an override option for temporary support, I'd appreciate it.

Signed-off-by: Payam Moghaddam <pmoghaddam@users.noreply.github.com>
@mui-bot
Copy link

mui-bot commented Jul 26, 2023

Netlify deploy preview

Netlify deploy preview: https://deploy-preview-9804--material-ui-x.netlify.app/

Updated pages

No updates.

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 316.2 475.7 396.5 395.36 70.25
Sort 100k rows ms 447.4 867.2 705.8 715.4 152.547
Select 100k rows ms 159.9 307 202.2 216.74 48.624
Deselect 100k rows ms 106.1 269.9 193.1 194.6 52.817

Generated by 🚫 dangerJS against 2872d57

@zannager zannager added the component: data grid This is the name of the generic UI component, not the React module! label Jul 27, 2023
@@ -182,7 +182,7 @@ export type GridRowTreeConfig = Record<GridRowId, GridTreeNode>;
/**
* The type of Id supported by the grid.
*/
export type GridRowId = string | number;
export type GridRowId = string | number | bigint;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me, but the problem is that bigint cannot be used as an index type.
There is an open issue in the TypeScript repo: microsoft/TypeScript#46395

Given the above, I'm not sure we can support it.
Any thoughts? cc @romgrk

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. Didn't know it was TypeScript oriented. Hmmm, need to figure out a workaround. There is so much type casting and conversion going on to quiet the compiler, it's making the code harder to read. If there is a recommendation, I'd appreciate it.

@pmoghaddam
Copy link
Author

Will close this for now to reduce noise. I'll instead follow TS's issue.

@pmoghaddam pmoghaddam closed this Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants