Skip to content

Commit

Permalink
force the sbom component columns to have consistent ordering
Browse files Browse the repository at this point in the history
Signed-off-by: Kaden Emley <[email protected]>
  • Loading branch information
kemley76 committed Aug 13, 2024
1 parent a687b4c commit 79777b6
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,14 @@ export default class ComponentTable extends Vue {
});
}
headerIndex(str: string) {
return this.headerOptions.findIndex((option) => option.key === str);
}
get headers() {
// ensure that the header columns are in a consistent order and not determined by
// the order in which they are selected
this.headerColumns.sort((a, b) => this.headerIndex(a) - this.headerIndex(b))
let h = this.headerColumns.map((v) => {
return {value: v, class: 'header-box', text: _.startCase(v)};
});
Expand Down

0 comments on commit 79777b6

Please sign in to comment.