You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I want to render a custom table component in my (default) listview. So I set the path of admin.components.view.list.Component.
The component renders the DefaultListView with a custom Table prop.
At first sight, everything looks fine. I can see the docs in my custom table. I can use sorting, pagination, the search bar and filters. Great.
Now, if I change the columns which should be displayed / hidden, the view rerenders with the default list view (and default table).
After reloading the page, my custom table will be displayed again (with new columns state).
I think the change of columns doesn't trigger a server request. So it wouldn't render the new table on the server, but on the client side. So I added "use client" to the view component. But in the client component, I can't get the documents as props.data.docs because the data prop is undefined.
Hi @dkirchhof - thank you for the clear reproduction! I can see the issue you are experiencing in v3.22.0 - the behavior caused by the column selector has since been resolved. Please update your Payload version to latest, which is currently v3.37.0 and this problem will be fixed for you.
Describe the Bug
Hello, I want to render a custom table component in my (default) listview. So I set the path of admin.components.view.list.Component.
The component renders the DefaultListView with a custom Table prop.
At first sight, everything looks fine. I can see the docs in my custom table. I can use sorting, pagination, the search bar and filters. Great.
Now, if I change the columns which should be displayed / hidden, the view rerenders with the default list view (and default table).
After reloading the page, my custom table will be displayed again (with new columns state).
I think the change of columns doesn't trigger a server request. So it wouldn't render the new table on the server, but on the client side. So I added "use client" to the view component. But in the client component, I can't get the documents as props.data.docs because the data prop is undefined.
Link to the code that reproduces this issue
https://github.com/dkirchhof/payload3-custom-list-view-bug
Reproduction Steps
Which area(s) are affected? (Select all that apply)
area: ui
Environment Info
The text was updated successfully, but these errors were encountered: