Note that ‘priority’ comes from the Relation Table, not Selection Table. I need this badly! Do you have any idea on how to add this info to my datagrid?
There is unfortunately a limitation of the react-select that Grocery CRUD is using which is not supporting reordering. I will check if we can use a different plugin so we can support priority field as well.
Okay. I thought that, in this case, the solution would be in the backend (php).
Note that I need (very common situation, IMHO) not only to order by ‘priority’ but also show the ‘priority’ column data alongside the data in the ‘Selection Table’:
I think it is very common for the ‘Relation Table’ to have additional fields (like ‘priority’ in your own example), not only the two FKs. So… those extra fields are there for a reason, we need to have a way to use them, whether to order or display them (or both). ‘priority’ is just an example. We could have created_at, updated_at and many other data in the ‘Relation Table’.
We could use a simple callbackColumn() to display the extra ‘priority’ field. But setting a callbackColumn() on a relational (simple or n-to-n) field breaks the whole thing (the datagrid shows the ids), as well as setting a custom field type (see here).