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] Table with big big width #1763

Closed
cezarsmpio opened this issue Sep 29, 2015 · 0 comments
Closed

[Table] Table with big big width #1763

cezarsmpio opened this issue Sep 29, 2015 · 0 comments
Labels
component: table This is the name of the generic UI component, not the React module!

Comments

@cezarsmpio
Copy link

Hi guys, I'm using the <Table> component, but it's render with large width.

captura de tela 2015-09-29 as 15 46 36

My code:

var React = require('react');

// Components
var UI = require('material-ui');
var Toolbar = UI.Toolbar;
var ToolbarGroup = UI.ToolbarGroup;
var ToolbarTitle = UI.ToolbarTitle;
var FlatButton = UI.FlatButton;
var RaisedButton = UI.RaisedButton;
var Table = UI.Table;
var TableBody = UI.TableBody;
var TableHeader = UI.TableHeader;
var TableHeaderColumn = UI.TableHeaderColumn;
var TableRow = UI.TableRow;
var TableRowColumn = UI.TableRowColumn;
var TableFooter = UI.TableFooter;

var TableSorter = React.createClass({

  propTypes: {
    multiSelectable: React.PropTypes.bool,
    columns: React.PropTypes.array.isRequired
  },

  getDefaultProps: function() {
    return {
      multiSelectable: false
    };
  },

  render: function() {

    return (
      <div className="table-component">
        <Table
          fixedHeader={false}
          fixedFooter={false}
          selectable={true}
          multiSelectable={this.props.multiSelectable}>

          <TableHeader key={0} enableSelectAll={true}>
            <TableRow key={0}>
              {this.props.columns.map(function (c, i) {
                return <TableHeaderColumn key={i}>{c}</TableHeaderColumn>
              })}
            </TableRow>
          </TableHeader>

          <TableBody key={1}>
            <TableRow>
              <TableRowColumn>1</TableRowColumn>
              <TableRowColumn>John Smith</TableRowColumn>
              <TableRowColumn>Employed</TableRowColumn>
            </TableRow>
          </TableBody>
        </Table>
      </div>
    );
  }
});

module.exports = TableSorter;

Any idea?

@cezarsmpio cezarsmpio changed the title Table with big big width [Table] Table with big big width Sep 29, 2015
mnajdova pushed a commit to mnajdova/material-ui that referenced this issue Nov 10, 2020
Bumps [babel-plugin-module-resolver](https://github.com/tleunen/babel-plugin-module-resolver) from 3.2.0 to 4.0.0.
- [Release notes](https://github.com/tleunen/babel-plugin-module-resolver/releases)
- [Changelog](https://github.com/tleunen/babel-plugin-module-resolver/blob/master/CHANGELOG.md)
- [Commits](tleunen/babel-plugin-module-resolver@v3.2.0...v4.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
@oliviertassinari oliviertassinari added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 25, 2022
@zannager zannager added component: table This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 13, 2023
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