Skip to content

Instantly share code, notes, and snippets.

@kaueDM
Created April 23, 2018 16:03
Show Gist options
  • Save kaueDM/54f774b2fda5e64866ef8be30a53c562 to your computer and use it in GitHub Desktop.
Save kaueDM/54f774b2fda5e64866ef8be30a53c562 to your computer and use it in GitHub Desktop.
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