Skip to content

Commit

Permalink
sort the state variables by key ref #638
Browse files Browse the repository at this point in the history
  • Loading branch information
RealZimboGuy committed May 1, 2024
1 parent 1682f15 commit 301abbe
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions nflow-explorer/src/workflow-instance/StateVariableTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ function StateVariableTable(props: {instance: WorkflowInstance}) {
</pre>
);
};
const columns = Object.keys(props.instance.stateVariables || {}).map(key => ({
field: key,
headerName: key,
fieldRender: renderValue
}));
const columns = Object.keys(props.instance.stateVariables || {})
.map(key => ({
field: key,
headerName: key,
fieldRender: renderValue
}))
.sort((a, b) => a.field.localeCompare(b.field));

if (!props.instance.stateVariables) {
return <Alert severity="info">No state variables</Alert>;
Expand Down

0 comments on commit 301abbe

Please sign in to comment.