Skip to content

Commit

Permalink
Sort by favorite on Browsing page
Browse files Browse the repository at this point in the history
Sort by favorite was not working on summary page.
  • Loading branch information
MVarshini authored Sep 27, 2022
1 parent 6fbc5b9 commit f4a59ef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dashboard/src/modules/components/TableComponent/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ const TableWithFavorite = () => {
!!favoriteRepoNames.find((element) => element.name === repo.name);

const getSortableRowValues = (data) => {
const { controller, name } = data;
const creationDate = data.metadata[DATASET_CREATED];
return [controller, name, creationDate];
return [data.name, creationDate, isRepoFavorited(data)];
};
if (activeSortIndex !== null) {
selectedArray.sort((a, b) => {
Expand All @@ -101,7 +100,7 @@ const TableWithFavorite = () => {
});
}
const getSortParams = (columnIndex) => ({
isFavorites: columnIndex === 3,
isFavorites: columnIndex === 2,
sortBy: {
index: activeSortIndex,
direction: activeSortDirection,
Expand Down

0 comments on commit f4a59ef

Please sign in to comment.