fix(ui): co-browser (assist) list sorting - duration
This commit is contained in:
parent
14d64256a9
commit
defcc65848
1 changed files with 5 additions and 1 deletions
|
|
@ -201,11 +201,15 @@ export default class SessionStore {
|
|||
});
|
||||
}
|
||||
|
||||
fetchLiveSessions = async (params = {}) => {
|
||||
fetchLiveSessions = async (params: any = {}) => {
|
||||
runInAction(() => {
|
||||
this.loadingLiveSessions = true;
|
||||
})
|
||||
try {
|
||||
if (params.sort === 'duration') { // TODO ui hack to sort by duration, should be removed once the api addressed this issue
|
||||
params.sort = 'timestamp';
|
||||
params.order = params.order === 'asc' ? 'desc' : 'asc';
|
||||
}
|
||||
const data: any = await sessionService.getLiveSessions(params);
|
||||
this.liveSessions = data.sessions.map((session: any) => new Session({ ...session, live: true }));
|
||||
this.totalLiveSessions = data.total;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue