Programmatically set custom order (reorder) in orderable collection via Local/REST API #15088
Answered
by
zubricks
thisanimus
asked this question in
Q&A
-
|
In Payload, I see that custom ordering within a collection is accomplished via fractional indexing. This order is typically changed via drag and drop, but I find I need to set the initial custom order programmatically once. Questions:
|
Beta Was this translation helpful? Give feedback.
Answered by
zubricks
Apr 2, 2026
Replies: 1 comment 1 reply
-
|
Hey @thisanimus Here are some answers to your questions:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
zubricks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @thisanimus
Here are some answers to your questions:
/api/reorderendpoint sequentially to place each one after the previous/api/reorderto move it._orderis a fractional index string, you'd need to fetch all documents sortedby _orderand find the index client-side