mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
Merge branch 'master' into improve-application-list-view-layout
This commit is contained in:
commit
1b37348b72
@ -66,7 +66,7 @@ export default class FeatureListComponent extends React.PureComponent {
|
||||
</FABButton>
|
||||
</Link>
|
||||
</div>
|
||||
<Card shadow={0} className={commonStyles.fullwidth}>
|
||||
<Card shadow={0} className={commonStyles.fullwidth} style={{ overflow: 'visible' }}>
|
||||
<CardActions>
|
||||
<DropdownButton id="metric" label={`Last ${settings.showLastHour ? 'hour' : 'minute'}`}/>
|
||||
<Menu target="metric" onClick={() => this.toggleMetrics()}
|
||||
@ -79,7 +79,7 @@ export default class FeatureListComponent extends React.PureComponent {
|
||||
<DropdownButton id="sorting" label={`By ${settings.sort}`}/>
|
||||
<Menu target="sorting" onClick={(e) => this.setSort(e.target.getAttribute('data-target'))}
|
||||
style={{ width: '168px' }}>
|
||||
<MenuItem disabled={!settings.sort || settings.sort === 'name'} data-target="name">Name</MenuItem>
|
||||
<MenuItem disabled={settings.sort === 'name'} data-target="name">Name</MenuItem>
|
||||
<MenuItem disabled={settings.sort === 'enabled'} data-target="enabled">Enabled</MenuItem>
|
||||
<MenuItem disabled={settings.sort === 'created'} data-target="created">Created</MenuItem>
|
||||
<MenuItem disabled={settings.sort === 'strategies'} data-target="strategies">Strategies</MenuItem>
|
||||
|
@ -21,7 +21,10 @@ const mapStateToProps = (state) => {
|
||||
);
|
||||
}
|
||||
|
||||
if (settings.sort) {
|
||||
if (!settings.sort) {
|
||||
settings.sort = 'name';
|
||||
}
|
||||
|
||||
if (settings.sort === 'enabled') {
|
||||
features = features.sort((a, b) => (
|
||||
// eslint-disable-next-line
|
||||
@ -53,7 +56,6 @@ const mapStateToProps = (state) => {
|
||||
return 1;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
features,
|
||||
|
Loading…
Reference in New Issue
Block a user