Repeater add new item to the top
Is it possible when adding a new repeater item to add it to the top instead of the bottom? It would be ideal if the add item button was also at the top so you don't need to scroll down then back up.
3 Replies
You can override the ->addAction() to insert the new item to the beginning of the array.
This should do what u want 🙂
Thanks for your help but overriding actions is a bit over my head atm. Your example seems to add 2 items to the top and 1 to the bottom. After looking at the repeater resource view it seems the button can only be displayed under the items anyway so I guess its not the ideal solution. I may look to use a relation manager for this case. Cheers.