cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting items in table doesn't work.

former_member589109
Participant
0 Kudos

I have a table in the view that I want to sort by timestamp so the newest items are on the top.

<Table id="SNatTable" items="{ path: 'StateOfNatureSet', sorter: { path: 'Timestamp', descending: true } }" [...]

But it doesn't work. The table is displayed in "last edited on the bottom" manner (when I edit any field the item wanders on the bottom of the list. The timestamp can't be edited).
I have used this syntax in other places and it worked just fine, but in this view, I can't sort it by any column (no matter if Timestamp or for example Anln1).

How to sort the table properly?

Accepted Solutions (0)

Answers (2)

Answers (2)

ericci
Active Contributor

Well, the syntax is correct.

Are you sure that Timestamp field is sortable? Have you checked on the Manifest XML?

former_member589109
Participant
0 Kudos

Indeed the sortable property was set to false but after updating the oData service, sadly, nothing changed.

ericci
Active Contributor
0 Kudos

Are you sure that sort is supported on your backend system?

junwu
Active Contributor
0 Kudos

sortable is just an indicator, you have to code to sort.