Skip to content

Commit

Permalink
Sort controls by rank in the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
davkal committed Apr 21, 2016
1 parent 8b06f6c commit eda2a20
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import _ from 'lodash';

import NodeDetailsControlButton from './node-details-control-button';

Expand All @@ -17,7 +18,7 @@ export default function NodeDetailsControls({controls, error, nodeId, pending})
<span className="node-details-controls-error-messages">{error}</span>
</div>}
<span className="node-details-controls-buttons">
{controls && controls.map(control => <NodeDetailsControlButton
{_.sortBy(controls, 'rank').map(control => <NodeDetailsControlButton
nodeId={nodeId} control={control} pending={pending} key={control.id} />)}
</span>
{controls && <span title="Applying..." className={spinnerClassName}></span>}
Expand Down

0 comments on commit eda2a20

Please sign in to comment.