benawad / basic-react-form

Basic form in React
85 stars 143 forks source link

Pagination #1

Open UmerIftikhar opened 6 years ago

UmerIftikhar commented 6 years ago

Hi Ben,

Is there a way to add pagination using material ui. Since, the official docs does not list pagination in the Table documentation. And is this https://material-ui-next.com/api/table-pagination/ also material ui??? And is it save to use it?

benawad commented 6 years ago

I think the link is still in beta, I would wait until it's released to use it. I think it's possible to add pagination

UmerIftikhar commented 6 years ago

Well, I guess its possible to add in the current version as well. You might have come across this https://github.com/mui-org/material-ui/issues/1511. https://github.com/mui-org/material-ui/issues/1511

By adding some thing like this:

`<Table height={this.state.height} fixedHeader={this.state.fixedHeader} fixedFooter={this.state.fixedFooter} selectable={false} multiSelectable={false}

{this.tableData ? Object.keys(this.tableData[0]).map((key, idx) => ( {Utils.toHeaderCase(key)} )) : ''} ( {Object.keys(row).map((prop, ind) => ( {row[prop]} )) } )) : ''} this.getPreviousPage()} disabled={!(this.props.pagination.hasOwnProperty('prev'))}> this.getNextPage()} disabled={!(this.props.pagination.hasOwnProperty('next'))}> `
benawad commented 6 years ago

yeah