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

[Table] Horizontal scrolling will move vertical scrollbar on tables with a lot of columns #3960

Closed
thomastvedt opened this issue Apr 13, 2016 · 2 comments
Labels
component: table This is the name of the generic UI component, not the React module!

Comments

@thomastvedt
Copy link

Problem Description

On tables with scrollable columns and rows, the vertical scrollbar isn't positioned correctly when scrolling horizontally, see picture:

materialtable3

It's fixed if I add the following bodyStyle to table (wrapper-div for inner table):

<Table bodyStyle={{width: '-fit-content'}} >

But it doesn't work in internet explorer.. And the vertical scrollbar is only visible if you scroll the horizontal scrollbar to the right.

From table.jsx render method:

return (
  <div style={prepareStyles(Object.assign(styles.tableWrapper, wrapperStyle))}>
    {headerTable}
    <div style={prepareStyles(Object.assign(styles.bodyTable, bodyStyle))} ref="tableDiv">
      <table className={className} style={mergedTableStyle} ref="tableBody">
        {inlineHeader}
        {inlineFooter}
        {tBody}
      </table>
    </div>
    {footerTable}
  </div>
);

Versions

  • Material-UI: "material-ui": "0.15.0-alpha.2",
  • React: "react": "^0.14.8",
  • Browser: chrome, windows 10
@mpontikes mpontikes mentioned this issue Aug 5, 2016
13 tasks
@HongJheLi
Copy link

See #4396 solve the issue.

<Table bodyStyle={{overflow:'visible'}}>

Side effect

@oliviertassinari oliviertassinari added the component: table This is the name of the generic UI component, not the React module! label Dec 18, 2016
@oliviertassinari
Copy link
Member

We have been porting the component on the v1-beta branch. We reimplemented it from the ground-up. While we haven't tested it, I think that the issue is most likely fixed on that branch. Hence, I'm closing it.
Still, we will accept PR fixes until v1-beta takes over the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: table This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

3 participants