- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 09, 2023 07:50 AM - edited Mar 09, 2023 07:52 AM
I am developing an extension to manage orders based on an ‘Orders’ table and a (linked) ‘Order Line Items’ table. My next objective is to allow line items to be re-ordered by the user via drag-and-drop.
I assume I can achieve this by adding a integer field to the table which gets updated by the drag event (?), but since this actually also is a native Airtable UI functionality and you can order records via drag-and-drop when your table/view isn’t sorted – I’m wondering whether someone knows anything of a custom order index being accessible or anything?
I’m guessing not, since I can’t find anything like that in the API docs…
But maybe you have other ideas to achieve this other than the one I mentioned? Or experience with a similar feat and you’ve got a js library you’d like to suggest or something?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 10, 2023 05:08 AM
Hm, when you do a selectRecordsAsync of the view where the user's re-ordered things via the drag-and-drop, the records are returned in the order displayed in the view the user's doing stuff in, and so I just end up looping through everything and doing a i++ to get a number to sort them by heh