Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Array "Add Button" above array

default discord avatar
etmartinkazoolast year
4

Is there a way to move the button that adds a new item in an array field from underneath said array to the top of the array? In arrays with a lot of items this seems like a better UX option. I may be missing this option in the docs.



Thanks!

  • default discord avatar
    thisisnotchrislast year

    Hello @etmartinkazoo - I created a discussion for this issue

    https://github.com/payloadcms/payload/discussions/2616
  • default discord avatar
    Jarrodlast year

    @etmartinkazoo I imagine we could play with the design if needed. However that would raise some other things to tackle. If it's at the top, where does the new item get created? At the bottom or the top?



    Did you know you could add items by opening the triple-dot menu on any array item? From there you can add an item below the item you interacted with.

  • default discord avatar
    thisisnotchrislast year

    That's a good point too @Jarrod

  • default discord avatar
    etmartinkazoolast year

    @Jarrod I should have been a bit more specific regarding our use case. I have a notes array and would in this case like the newest notes on top with the oldest notes at the bottom. This array can get rather long but to your point using the three dots is a very reasonable solution that I should have thought of!

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.