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.

Introducing RenderFields in my custom list view

default discord avatar
enrico.bagattin2 years ago
4

Hello, I am creating an events collection, I have successfully overwrited the default list view showing my results in FullCalendar.


Now I am trying to make a straightforward experience using modals when a user wants to create or update calendar's events. I'm able to use Payload's field components to make the form with an aligned design but I'm wondering for future developments if it is possible to use (and how) the "RenderFields" component in my modals (hiding the dates fields).



I have also another question, is it possible to access the current user lang in the custom view?

  • discord user avatar
    jacobsfletch
    2 years ago
    @1077612284869885973

    we're actively overhauling our component library right now to make it significantly easier to reuse. What you describe here is the exact type of requirement we're hoping to completely solve. You can track the effort or post your ideas in this thread

    https://github.com/payloadcms/payload/discussions/293

    Then to your second question, you can access the current user language via the

    useLocale

    hook described here

    https://payloadcms.com/docs/admin/hooks#uselocale
  • default discord avatar
    enrico.bagattin2 years ago
    @808734492645785600

    Yes, it would be great to have reusable components.


    Looking to my issue in a broader view I have found some missings in Payload in the concept of list views (there is only table and grid view for media), looking to other CMS like Directus, there are various layouts to display data. Having the ability to use payload components like form inputs make it easier to create plugins for new views. For example in my case the calendar view, or the map view etc. I don't know if someone has already mentioned this.

  • discord user avatar
    jacobsfletch
    2 years ago

    Absolutely. Payload form inputs are definitely on the roster. As far as having multiple list view layout options, you can currently swap in your own list component using the

    views.List

    property

    https://payloadcms.com/docs/admin/components#collections

    . Long term I could see Payload offering a grid layout out of the box but that's not currently planned.

  • default discord avatar
    yersnlast year

    Hi there, can you please share your code, wanted to build something similar

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.