material-table icon indicating copy to clipboard operation
material-table copied to clipboard

Removing overflow-y: auto wrapper around table.

Open vivirancy opened this issue 7 years ago • 3 comments

It seems like every instance of material-table is wrapped with three div's, one of which has the style overflow-y: auto;. I can understand how this would be desirable in the event that the content cannot fit on the page, however, its causing an issue when a field uses react-select for editing. The select drop down will bleed off the end of the table, and because the position of the drop-down box is absolute, a scroll bar will never appear and the content will be hidden from sight due to the overflow-y: auto style.

image

For now, I must apply an ugly fix of making the drop-down be position: fixed which expands the row vertically so it appears within the containing divs.

Is it possible to remove the overflow-y: auto surrounding the table, or would anyone be able to provide a better alternative fix for this?

vivirancy avatar Aug 15 '19 14:08 vivirancy

I was able to fix this by adding the following properties to my react-select.

menuPosition={'fixed'}
menuPlacement={'auto'}

I think it would still be nice to give the user control over the style of the table wrapper, though I'm not sure how much benefit their would be.

vivirancy avatar Aug 15 '19 15:08 vivirancy

I could also really use to remove the overflow-y, when removed I can more properly handle the over flow at a higher div level so that my column headers can stay as you scroll. Is there any plan to fix this?

mebuckler avatar Nov 13 '19 18:11 mebuckler

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

stale[bot] avatar Jun 15 '20 10:06 stale[bot]