Fix databases truncated view bug

Summary:
The structure of the page is:
```
<FlexColumn>
  <Toolbar />
  <Content />
  <Toolbar />
</FelxColumn>
```

When Content is a FlexColumn, it doesn't play well with the others and uses all the space, to you don't see the bottom toolbar.
Changing it to a FlexRow fixes this. Also added an inner FlexColumn to make sure the behaviour for things inside Content isn't changed (flex-direction needs to be column in there).

Reviewed By: nikoant

Differential Revision: D19766120

fbshipit-source-id: 2872561bbc954db0d4dc3d7040f60c3eec6e3ff2
This commit is contained in:
John Knox
2020-02-06 06:12:09 -08:00
committed by Facebook Github Bot
parent 07bc0088ef
commit 15ed856388

View File

@@ -1371,31 +1371,35 @@ export default class DatabasesPlugin extends FlipperPlugin<
</Toolbar>
</div>
) : null}
<FlexColumn grow={true}>
{this.state.viewMode === 'data'
? renderTable(this.state.currentPage, this)
: null}
{this.state.viewMode === 'structure' ? this.renderStructure() : null}
{this.state.viewMode === 'SQL'
? this.renderQuery(this.state.queryResult)
: null}
{this.state.viewMode === 'tableInfo' ? (
<Textarea
style={{
width: '98%',
height: '100%',
marginLeft: '1%',
marginTop: '1%',
marginBottom: '1%',
readOnly: true,
}}
value={sqlFormatter.format(this.state.tableInfo)}
/>
) : null}
{this.state.viewMode === 'queryHistory'
? renderQueryHistory(this.state.queryHistory)
: null}
</FlexColumn>
<FlexRow grow={true}>
<FlexColumn grow={true}>
{this.state.viewMode === 'data'
? renderTable(this.state.currentPage, this)
: null}
{this.state.viewMode === 'structure'
? this.renderStructure()
: null}
{this.state.viewMode === 'SQL'
? this.renderQuery(this.state.queryResult)
: null}
{this.state.viewMode === 'tableInfo' ? (
<Textarea
style={{
width: '98%',
height: '100%',
marginLeft: '1%',
marginTop: '1%',
marginBottom: '1%',
readOnly: true,
}}
value={sqlFormatter.format(this.state.tableInfo)}
/>
) : null}
{this.state.viewMode === 'queryHistory'
? renderQueryHistory(this.state.queryHistory)
: null}
</FlexColumn>
</FlexRow>
<Toolbar position="bottom" style={{paddingLeft: 8}}>
<FlexRow grow={true}>
{this.state.viewMode === 'SQL' && this.state.executionTime !== 0 ? (