diff --git a/src/browser/modules/D3Visualization/components/Inspector.jsx b/src/browser/modules/D3Visualization/components/Inspector.jsx index 253aa39a167..b5b8ce2c54a 100644 --- a/src/browser/modules/D3Visualization/components/Inspector.jsx +++ b/src/browser/modules/D3Visualization/components/Inspector.jsx @@ -38,9 +38,16 @@ import { import { GrassEditor } from './GrassEditor' import { RowExpandToggleComponent } from './RowExpandToggle' -const mapItemProperties = itemProperties => { - return itemProperties.map((prop, i) => { - return ( +const mapItemProperties = itemProperties => ( + itemProperties + .sort(({ key: keyA }, { key: keyB }) => ( + keyA < keyB + ? -1 + : keyA === keyB + ? 0 + : 1 + )) + .map((prop, i) => ( {prop.key + ': '} @@ -49,9 +56,8 @@ const mapItemProperties = itemProperties => { {prop.value.toString()} - ) - }) -} + )) +) const mapLabels = (graphStyle, itemLabels) => { return itemLabels.map((label, i) => {