mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Conditionally render rather than show expand/collapse
This commit is contained in:
parent
4a8791693f
commit
14f1c4b652
@ -86,7 +86,7 @@ class DataListToolbar extends React.Component {
|
||||
sortedColumnKey,
|
||||
sortOrder,
|
||||
addUrl,
|
||||
hideExpandCollapse
|
||||
showExpandCollapse
|
||||
} = this.props;
|
||||
const {
|
||||
// isActionDropdownOpen,
|
||||
@ -203,18 +203,20 @@ class DataListToolbar extends React.Component {
|
||||
</Button>
|
||||
</ToolbarItem>
|
||||
</ToolbarGroup>
|
||||
<ToolbarGroup className={hideExpandCollapse ? 'pf-u-display-none' : null}>
|
||||
<ToolbarItem>
|
||||
<Button variant="plain" aria-label={i18n._(t`Expand`)}>
|
||||
<BarsIcon />
|
||||
</Button>
|
||||
</ToolbarItem>
|
||||
<ToolbarItem>
|
||||
<Button variant="plain" aria-label={i18n._(t`Collapse`)}>
|
||||
<EqualsIcon />
|
||||
</Button>
|
||||
</ToolbarItem>
|
||||
</ToolbarGroup>
|
||||
{ showExpandCollapse && (
|
||||
<ToolbarGroup>
|
||||
<ToolbarItem>
|
||||
<Button variant="plain" aria-label={i18n._(t`Expand`)}>
|
||||
<BarsIcon />
|
||||
</Button>
|
||||
</ToolbarItem>
|
||||
<ToolbarItem>
|
||||
<Button variant="plain" aria-label={i18n._(t`Collapse`)}>
|
||||
<EqualsIcon />
|
||||
</Button>
|
||||
</ToolbarItem>
|
||||
</ToolbarGroup>
|
||||
)}
|
||||
</Toolbar>
|
||||
</LevelItem>
|
||||
<LevelItem>
|
||||
|
||||
@ -205,7 +205,6 @@ class Organizations extends Component {
|
||||
onSearch={this.onSearch}
|
||||
onSort={this.onSort}
|
||||
onSelectAll={this.onSelectAll}
|
||||
hideExpandCollapse
|
||||
/>
|
||||
<I18n>
|
||||
{({ i18n }) => (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user