List/Table Field #7141
Replies: 2 comments
-
Yes, it would be definitely good for the payload CMS ecosystem. It could be related to a collection or be inside of the collection using JSON field. I vote to use TansTack Table for this. Also I saw that someone made a field: https://github.com/notchris/payload-table-field/ But is on the V2 version. I tried to migrate it to v3 but many props and components have changed. |
Beta Was this translation helpful? Give feedback.
-
I was having the same need and I am trying to create a custom field for my relationships, but with no luck yet. there are so many undocumented things to know about and my implementation is always lacking something not trivial to work as expected. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Current Challenge
Currently, displaying "nested" related collection documents in a table view is challenging and requires custom UI components. For example, consider the relationship between Customers and Orders. Customer "John Doe" is related to multiple orders: Order 1, Order 2, etc.
In e-commerce platforms such as Magento 2 and Medusa.js, it is common practice to show these relationships in tables. This presentation enhances the usability and clarity of relationships and data.
Proposed Solution
It would be beneficial to have a list/table field especially for relationships, where users can view, edit, and delete related entries directly within the parent document's view. This field could also be used to represent other (non-relationship) data.
Alternative Presentation
An alternative presentation for relationships could be considered, but it would only make sense if bidirectional relationships already exist. The issue is that since the Postgres-Relationship-Column-Update , you want to keep the relationship on the many side to preserve a clear database schema. However, you also want to display the related list of data on the one side not the many side (e.g. customer layout should contain orders, not the other way around).
Quick Mockup
Here's an example mockup of what a table field could look like (just the list view within the edit view):

Magento 2
Medusa.js
Implementing this feature would significantly enhance the usability and functionality of our system, aligning it with common practices in other e-commerce platforms.
Beta Was this translation helpful? Give feedback.
All reactions