avo
avo copied to clipboard
Reorder key-value fields
trafficstars
Feature
It would be helpful to reorder key-value fields. At the moment when you enter key values the only way to reorder them is to delete and re-add, which is difficult if you have many entries.
Current workarounds
Delete and re-add those entries. Alternatively, when you display them to the user (outside of avo) you could apply a sort, but only very simple sorting would be possible (like alphabetical ordering).
Screenshots

Additional context
You can see this in the avo demo app
That sounds like a good idea. It shouldn't be that difficult to implement. Maybe someone can pick it up.
- We have icon assets for records re-ordering (
arrow-up.svg&arrow-down.svg). - The JS logic should be to move an item in an array. The field holds the items as array of arrays in memory (
[['hoho', 'hohoho'], ['Teste', 'abc'], ...]in the above example). - The JS logic should enable/disable the up/down buttons when the item is first/last
- That's it 🤷♂️