I'm adding a grid created with the react-data-grid component inside a bootstrap tab created using reactstrap, but the grid is not shown correctly inside the tab, just an horizontal line, but if I place the same code outside the tab the grid is displayed correctly
<TabPane tabId="2">
<Container>
<Row>
<Col sm="12" >
<CardTitle>Special Title Treatment</CardTitle>
<Card body style={{ height: '500px'}}>
<CardText>With supporting text below as a natural lead-in to additional content.</CardText>
<Button>Go somewhere</Button>
<DropDownClienti />
{clienteId}
{ultimiGiorni.status === 'loading' &&
<div>Loading...</div>}
{ultimiGiorni.status === 'loaded' &&
<DataGrid
columns={columns}
rows={ultimiGiorni.payload.results}
onRowsUpdate={(evt) => {
//@ts-ignore
let toUpdate = { ...ultimiGiorni.payload.results[evt.fromRow], ...evt.updated};
console.log('evt', evt, 'toUpdate', toUpdate );
}}
/>
}
{ultimiGiorni.status === 'error' && (
<div>Error, the backend moved to the dark side.</div>
)}
</Card>
</Col>
</Row>
</Container>
</TabPane>
If I place the grid this way is not working, If I place it after the tabContent I can use it correctly. Am I missing something?