Collection search field using relation fields #4759
ritik-agarwal
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In the admin panel , the collection search field is not able to search if we define a relationship field for search specific item from the list
`
import { CollectionConfig } from "payload/types";
const FormSubmissions: CollectionConfig = {
slug: 'form-submissions',
access: {
read: (): boolean => true,
},
admin: {
listSearchableFields: ['title'],
},
fields: [
{
name: "submissionId",
label: "Submission ID",
type: "text",
required: true,
},
{
name: 'form',
label: 'Form',
type: 'relationship',
relationTo: 'forms',
required: true,
hasMany: true,
},
],
};
export default FormSubmissions;
,
`
In the given code , I have created a relation field of forms in my formSubmissions collection , but it is not possible to search by that field into form submission.
Beta Was this translation helpful? Give feedback.
All reactions