Array "Add Button" above array

default discord avatar
etmartinkazoo
9 months ago
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
    thisisnotchris
    9 months ago

    Hello @etmartinkazoo - I created a discussion for this issue

    https://github.com/payloadcms/payload/discussions/2616
  • default discord avatar
    Jarrod
    9 months ago

    @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
    thisisnotchris
    9 months ago

    That's a good point too @Jarrod

  • default discord avatar
    etmartinkazoo
    9 months ago

    @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!

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

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