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

[DataGrid] Fix density prop when toolbar is hidden #717

Merged

Conversation

DanailH
Copy link
Member

@DanailH DanailH commented Dec 10, 2020

While enabling the toolbar in the density stories in storybook I found a but that the density prop is not being respected if the Density Selector is not visible although that the hook is being activated.

I added the fix as part of this PR and covered the case with tests.

@oliviertassinari oliviertassinari added component: data grid This is the name of the generic UI component, not the React module! core Infrastructure work going on behind the scenes labels Dec 10, 2020
@oliviertassinari oliviertassinari changed the title [DataGrid] Enable toolbar in the storybook toolbar stories [core] Enable toolbar in the storybook toolbar stories Dec 10, 2020
@DanailH
Copy link
Member Author

DanailH commented Dec 10, 2020

While enabling the toolbar in the density stories in storybook I found a bug that the density prop is not being respected if the Density Selector is not visible although that the hook is being activated.

I added the fix as part of this PR and covered the case with tests.

@DanailH DanailH added the bug 🐛 Something doesn't work label Dec 10, 2020
@DanailH DanailH self-assigned this Dec 10, 2020
@oliviertassinari oliviertassinari changed the title [core] Enable toolbar in the storybook toolbar stories [DataGrid] Fix density prop when toolbar is hidden Dec 10, 2020
@oliviertassinari oliviertassinari removed the core Infrastructure work going on behind the scenes label Dec 10, 2020
@dtassone
Copy link
Member

dtassone commented Dec 10, 2020

Nice 👍
Is it possible to add the density option in the args of the playground stories, so we can play with the density among all the other options

@DanailH
Copy link
Member Author

DanailH commented Dec 10, 2020

Nice 👍
Is it possible to add the density option in the args of the playground stories, so we can play with the density among all the other options

Sure, can you just point me to which stories in the playground folder you want it enabled. Also probably it is better to enable the entire toolbar with showToolbar instead of just setting the density?

@DanailH DanailH force-pushed the fix/DataGrid-NO_TICKET-show-toolbar-storybook branch from 38bbb38 to 9463afd Compare December 11, 2020 10:58
@dtassone
Copy link
Member

Nice 👍
Is it possible to add the density option in the args of the playground stories, so we can play with the density among all the other options

Sure, can you just point me to which stories in the playground folder you want it enabled. Also probably it is better to enable the entire toolbar with showToolbar instead of just setting the density?

it's already done actually

@DanailH DanailH merged commit 3eb2d4d into mui:master Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work 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.

None yet

3 participants