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?
@Enrico 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@jacobsfletch 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.
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.
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.