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

Is it possible to have more control over the MINIMUM_WIDTH_FOR_GRID_CONTROLS #3505

Closed
mmourafiq opened this issue May 21, 2020 · 4 comments · Fixed by #3527
Closed

Is it possible to have more control over the MINIMUM_WIDTH_FOR_GRID_CONTROLS #3505

mmourafiq opened this issue May 21, 2020 · 4 comments · Fixed by #3527

Comments

@mmourafiq
Copy link

Hi, I was wondering if it's possible to have some control over the behaviour when the grid has a width < MINIMUM_WIDTH_FOR_GRID_CONTROLS, currently only the Full screen is enabled, I imagine that at least 2/3 controls could fit the size as well.

@snide
Copy link
Contributor

snide commented May 21, 2020

This makes sense, considering that the consuming application has so much direction over what shows in the app bar itself. Assume exposing a prop would work for you so you could set it yourself?

@mmourafiq
Copy link
Author

mmourafiq commented May 21, 2020

I think just giving the control to the end user to trigger that behavior or not would be more than sufficient, you can keep the current behavior as default, and for users who want to disable the behavior, they can control the visibility behavior manually.

As an example, I have a table with a mode visualize:

Screenshot 2020-05-21 at 23 36 10

When the mode is activated, the grid goes to 400px:

Screenshot 2020-05-21 at 23 42 32

right now I just hide all visibiliy, and show a button manually to go back to the full table mode. If I can just disable the MINIMUM_WIDTH_FOR_GRID_CONTROLS I am sure I won't break the design, because I will only show the controls that will fit the size, e.g. my extra control and possibly one of the visibility controls.

@chandlerprall
Copy link
Contributor

Boolean props tend to grow unwieldy as time passes. I think taking a minSizeForControls prop that the application could pass 0 to for disabling is the most future proof?

@mmourafiq
Copy link
Author

minSizeForControls should work as well, and it won't introduce any breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants