Created
April 23, 2018 16:03
-
-
Save kaueDM/54f774b2fda5e64866ef8be30a53c562 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render() { | |
const { fabrics, loading, alert } = this.state | |
return ( | |
<div className='main-content'> | |
{alert} | |
{this.fabricModal()} | |
<Card content={ | |
<Grid fluid> | |
<Row> | |
<Col md={12}> | |
<Button | |
bsStyle='default' | |
wd | |
className='pull-right' | |
style={{ marginBottom: 10 }} | |
onClick={() => { | |
this.props.resetForm('FabricForm') | |
this.setState({ fabricModal: true, targetFabric: null }) | |
}} | |
> | |
Adicionar Tecido | |
</Button> | |
</Col> | |
</Row> | |
<Row> | |
<Col md={12}> | |
<ReactTable | |
columns={[ | |
{ Header: 'Nome', accessor: 'name' }, | |
{ | |
Header: 'Ações', accessor: '', | |
Cell: ({ value }) => (this._renderTableActions(value)) | |
} | |
]} | |
data={orderBy(fabrics, ['name', 'asc'])} | |
onFetchData={this._fetchFabrics} | |
loading={loading} | |
defaultPageSize={10} | |
className='-striped -highlight' | |
previousText='Anterior' | |
nextText='Próximo' | |
loadingText='Carregando' | |
noDataText='Nenhum tecido encontrado' | |
pageText='Página' | |
ofText='de' | |
rowsText='Registros' | |
/> | |
</Col> | |
</Row> | |
</Grid> | |
} /> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment