rfhub2 icon indicating copy to clipboard operation
rfhub2 copied to clipboard

Add sorting for Keywords table

Open mnojek opened this issue 5 years ago • 3 comments

Having the ability to sort the table content on the values by clicking on column headers would be a nice addition.

mnojek avatar Jan 03 '20 10:01 mnojek

I think this will be covered by #67. There would be definetely a need to sort keywords, either by name, or statistics. This table comes to my mind, but it might be also done by api. Ther are two things to take into consideration:

  • collection table is paged, so sorting not entire set of results might be misleading, so it would be good to use api for that
  • keywords table are sent in full, so frontend would do it correctly and we would avoid sending data each and every time

@pbylicki, what is your thought bout that?

MaciejWiczk avatar Jan 03 '20 16:01 MaciejWiczk

@MaciejWiczk As you wrote, there are two cases here:

  • When table is paged, we would need to do this on API side
  • When table is not paged like on the collection details view, we could do this on frontend side

I think that should be done independently from #67 as it will still require quite a few changes on both sides and is not critical to implement #67. First we should implement it on API side, so we can use API-side sorting and then add support for client-side sorting (it is currently only one table)

pbylicki avatar Jan 06 '20 17:01 pbylicki

I could take API sorting. I guess it would need additional parameter ie. sort_by and sorting direction

MaciejWiczk avatar Jan 06 '20 17:01 MaciejWiczk