daniel-nagy / md-data-table

Material Design Data Table for Angular Material
MIT License
1.9k stars 519 forks source link

Horizontal scroll bar in Chrome #279

Closed csotomon closed 6 years ago

csotomon commented 8 years ago

Hi, I have a

table with a lot of columns.

In Internet explorer the module render the scroll bar perfectly, but in chrome dont's works, and my side bar disappears. How can I solve this?

Internet Explorer ie

Chorme chrome

dbo35 commented 8 years ago

easy fix is adding style="overflow-y : scroll"

edit : overflow-x:scroll; and give it a fixed width

csotomon commented 8 years ago

I inserted the style in the next tags and doesn't works.

md-card md-table-container table

dbo35 commented 8 years ago

I'll check my code and give more detail

csotomon commented 8 years ago

Hi, do you have some news about this problem?

dbo35 commented 8 years ago

trying to find the source of this issue...

in the meantime give different breakpoints fixed widths on the md-table-container and set overflow-x:scroll.

something in the table header is causing the entire container to expand indefinitely to fit all columns and is pushing the sidenav / everything else off of the screen instead of keeping to its flexbox.

<md-table-container style="max-width:700px; overflow-x:scroll;"> <table md-table>

leocaseiro commented 8 years ago

It's working fine for me on Chrome OSX. Make sure you add <md-content flex layout="column">. Perhaps you'll need to add a layout-fill in it's wrapper:

<main layout-fill>
    <md-content layout="column" flex>
        <md-table-container>
            <table md-table>
                ...
            </table>
        </md-table-container>
    </md-content>
</main>