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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[data-grid-generator] randomInt might generate a value exceeding max value #9084

Closed
2 tasks done
cherniavskii opened this issue May 23, 2023 · 0 comments 路 Fixed by #9086
Closed
2 tasks done

[data-grid-generator] randomInt might generate a value exceeding max value #9084

cherniavskii opened this issue May 23, 2023 · 0 comments 路 Fixed by #9086
Labels
bug 馃悰 Something doesn't work core Infrastructure work going on behind the scenes docs Improvements or additions to the documentation

Comments

@cherniavskii
Copy link
Member

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 馃暪

Link to live example: https://codesandbox.io/s/strange-villani-19cjym?file=/demo.tsx

Steps:

  1. Click on "Generate ..." button until you see results exceeding the boundaries

Current behavior 馃槸

Sometimes integers exceed the max boundary:

Expected behavior 馃

The generated integer should not exceed the max boundary

Context 馃敠

@joserodolfofreitas noticed an issue in our data grid demo at https://mui.com/x/.
Sometimes some of the rows are missing the commodity field and are rendered outside of the groups:

missing-commodity.mov

We use the randomCommodity function for this and it should never return undefined:

export const randomCommodity = () => randomArrayItem(COMMODITY_OPTIONS);

This is how I discovered an issue with the randomInt function.

Your environment 馃寧

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Order ID or Support key 馃挸 (optional)

No response

@cherniavskii cherniavskii added status: waiting for maintainer These issues haven't been looked at yet by a maintainer bug 馃悰 Something doesn't work docs Improvements or additions to the documentation and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 23, 2023
@cherniavskii cherniavskii added the core Infrastructure work going on behind the scenes label May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 馃悰 Something doesn't work core Infrastructure work going on behind the scenes docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant