mirror of
https://github.com/apache/superset.git
synced 2026-04-26 19:44:58 +00:00
fix: data column in SQL lab left panel open by default (#13624)
* fix table expand * Left Panel Expand * added tests Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
This commit is contained in:
@@ -147,8 +147,9 @@ export default class SqlEditorLeftBar extends React.PureComponent {
|
||||
<StyledScrollbarContainer>
|
||||
<StyledScrollbarContent contentHeight={tableMetaDataHeight}>
|
||||
<Collapse
|
||||
ghost
|
||||
expandIconPosition="right"
|
||||
activeKey={this.props.tables
|
||||
.filter(({ expanded }) => expanded)
|
||||
.map(({ id }) => id)}
|
||||
css={theme => css`
|
||||
.ant-collapse-item {
|
||||
margin-bottom: ${theme.gridUnit * 3}px;
|
||||
@@ -169,12 +170,15 @@ export default class SqlEditorLeftBar extends React.PureComponent {
|
||||
}
|
||||
}
|
||||
`}
|
||||
expandIconPosition="right"
|
||||
ghost
|
||||
>
|
||||
{this.props.tables.map(table => (
|
||||
<TableElement
|
||||
table={table}
|
||||
key={table.id}
|
||||
actions={this.props.actions}
|
||||
onClick={this.toggleTable}
|
||||
/>
|
||||
))}
|
||||
</Collapse>
|
||||
|
||||
@@ -283,6 +283,7 @@ class TableElement extends React.PureComponent {
|
||||
{...this.props}
|
||||
header={this.renderHeader()}
|
||||
className="TableElement"
|
||||
forceRender="true"
|
||||
>
|
||||
{this.renderBody()}
|
||||
</Collapse.Panel>
|
||||
|
||||
Reference in New Issue
Block a user