KarrLab / datanator_frontend

Graphical web-based interface for the Datanator toolkit for discovering data for modeling cells
https://datanator.info
MIT License
1 stars 1 forks source link

Set a default sorting for all data tables #219

Closed jonrkarr closed 4 years ago

jonrkarr commented 4 years ago

I think we should set a default sorting for all of the data tables.

Right now, the order relates to how the data was loaded into and out of our database. In particular, this can be sensitive to the order in which we integrated data sources into the database. This may look strange to users.

Instead, I think we should sort the rows by the measured values. For example, sort the metabolite concentration table by the measured concentration.

After each table is loaded, use the ag-Grid's setSortModel method to sort the rows:

let sortColId = columnApi.getDisplayedCenterColumns()[0]['colId'];
gridApi.setSortModel([{
    colId: sortColId,
    sort: "asc"
}])
jonrkarr commented 4 years ago

Done in stats branch