-
Notifications
You must be signed in to change notification settings - Fork 933
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
Feature/issue 1063 responsive options and table height #1134
Feature/issue 1063 responsive options and table height #1134
Conversation
Allows some flexibility in case height becomes a separate option
Allows fixed header to operate as well as fix issues where the width of the table overflows the browser window
Mirrors the responsive scroll full width option to allow fixed header to behave properly
…o feature/issue-1063-responsive-options-and-table-height # Conflicts: # src/MUIDataTable.js
@maxkarkowski If you have an overflowing width, then you'd probably want to use |
@gabrielliwerant thanks for the hint. i tried so both settings won't really fit for large tables |
@maxkarkowski The table is not guaranteed to display properly on the inside of a grid. The responsive options assume that the table is directly affected by the window dimensions. This may be something you have to experiment with by overriding styles on your end. |
I'm curious why the hard coded 499px for scrollMaxHeight moved from the style to the element itself. We'd overridden the style value to good success but when we upgraded to the newest version, the override no longer worked since styled on the element is more specific than class styles, so the override no longer worked. I was able to work around it by override with "!important" so it's not a huge deal. I just feel icky using that :P Thanks! |
* Decouple height from responsive options Allows some flexibility in case height becomes a separate option * Add full width responsive scroll option Allows fixed header to operate as well as fix issues where the width of the table overflows the browser window * Add responsive stacked full width option Mirrors the responsive scroll full width option to allow fixed header to behave properly * Update documentation for new responsive options
Closes #1075, #1063 and continues by adding two new options for responsive cases:
Both use absolute position on the paper container element to allow window width to be surrounded by the container to fix visual breakage with overflowing widths, but also allow fixed header options to operate.
Height was decoupled in the code, but not created as a separate option as height will only be supported by certain responsive modes, which is likely to create confusion. Overriding styles allows altering height values, so this functionality exists regardless, but the decoupling will make it easier to modify the API in the future if there's a good way to do so.