[data-grid-generator] randomInt
might generate a value exceeding max
value
#9084
Closed
2 tasks done
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/s/strange-villani-19cjym?file=/demo.tsx
Steps:
Current behavior 😯
Sometimes integers exceed the
max
boundary:Expected behavior 🤔
The generated integer should not exceed the
max
boundaryContext 🔦
@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 returnundefined
:mui-x/packages/grid/x-data-grid-generator/src/services/random-generator.ts
Line 119 in 1096705
This is how I discovered an issue with the
randomInt
function.Your environment 🌎
npx @mui/envinfo
Order ID or Support key 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: