Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

How to get record by manual sort?

Topic Labels: Custom Extensions
Solved
Jump to Solution
1804 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Arvin_Xu
5 - Automation Enthusiast
5 - Automation Enthusiast

I can get records sorted by some field like below

  const records = useRecords(table, {
    sorts: [{ direction: 'desc', field: actionField }],
  });

but how can I get records sorted by manual order?

1 Solution

Accepted Solutions
Kamille_Parks
16 - Uranus
16 - Uranus

What do you mean by manual order? You can adopt the sorting of a particular view by pulling records from there as opposed to a table. Otherwise its going to be records.sort((a,b) => {insert your sorting logic here})

See Solution in Thread

2 Replies 2
Kamille_Parks
16 - Uranus
16 - Uranus

What do you mean by manual order? You can adopt the sorting of a particular view by pulling records from there as opposed to a table. Otherwise its going to be records.sort((a,b) => {insert your sorting logic here})

Arvin_Xu
5 - Automation Enthusiast
5 - Automation Enthusiast

You can adopt the sorting of a particular view by pulling records from there as opposed to a table

That’s the solution.Thanks a lot!