Skip to content

Commit

Permalink
sort the state variables by key ref #638 (#639)
Browse files Browse the repository at this point in the history
  • Loading branch information
RealZimboGuy authored May 2, 2024
1 parent 1682f15 commit 67fe85f
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 67fe85f

Please sign in to comment.