X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/341b552800f6866fc3f73b4f6c1468425e485694..b3ffad71aa43fcb8db2d2c7a20ee0ef588e37e04:/src/store/shared-with-me-panel/shared-with-me-middleware-service.ts diff --git a/src/store/shared-with-me-panel/shared-with-me-middleware-service.ts b/src/store/shared-with-me-panel/shared-with-me-middleware-service.ts index b268e315ab..c139b429da 100644 --- a/src/store/shared-with-me-panel/shared-with-me-middleware-service.ts +++ b/src/store/shared-with-me-panel/shared-with-me-middleware-service.ts @@ -18,6 +18,7 @@ import { SortDirection } from '~/components/data-table/data-column'; import { OrderBuilder, OrderDirection } from '~/services/api/order-builder'; import { ProjectResource } from '~/models/project'; import { ProjectPanelColumnNames } from '~/views/project-panel/project-panel'; +import { getSortColumn } from "~/store/data-explorer/data-explorer-reducer"; export class SharedWithMeMiddlewareService extends DataExplorerMiddlewareService { constructor(private services: ServiceRepository, id: string) { @@ -50,7 +51,7 @@ export const getParams = (dataExplorer: DataExplorer) => ({ }); export const getOrder = (dataExplorer: DataExplorer) => { - const sortColumn = dataExplorer.columns.find(c => c.sortDirection !== SortDirection.NONE); + const sortColumn = getSortColumn(dataExplorer); const order = new OrderBuilder(); if (sortColumn) { const sortDirection = sortColumn && sortColumn.sortDirection === SortDirection.ASC