Skip to content

Commit

Permalink
PR improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
frankyhollywood committed Dec 13, 2023
1 parent db2cfeb commit 7e10ef2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions projects/mercury/src/metadata/views/MetadataViewTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,7 @@ export const MetadataViewTabs = (props: MetadataViewTabsProperties) => {
accessColumn
];
}
return view.columns.sort((a, b) => {
if (a.displayIndex > b.displayIndex) {
return 1;
}
if (a.displayIndex < b.displayIndex) {
return -1;
}
return 0;
});
return view.columns.sort((a, b) => a.displayIndex - b.displayIndex);
};

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static class Column {
@NotNull public ColumnType type;
@NotBlank public String source;
// displayIndex determines the order of columns on the view page.
@NotNull public Integer displayIndex = 999;
@NotNull public Integer displayIndex = Integer.MAX_VALUE;
public String rdfType;
public int priority;
}
Expand All @@ -100,7 +100,7 @@ public static class JoinView {
@JsonSetter(nulls = Nulls.AS_EMPTY)
public List<String> include;
// displayIndex determines the order of columns on the view page, for joinView it is the column displaying the related entity
public Integer displayIndex = 999;
public Integer displayIndex = Integer.MAX_VALUE;
}
}
}

0 comments on commit 7e10ef2

Please sign in to comment.