extended-salmon
extended-salmonā€¢2y ago

search multiple antd columns field from search box

how can we search multiple columns field from a search box
8 Replies
refine-support-bot
refine-support-botā€¢2y ago
Hi, I am refine support bot :wave:. I am here to help you with your question. I searched for the answer to your question in the refine documentation and found an answer! šŸ†
Answer: You can search multiple columns from a search box by setting the filterOperator property of the column to "contains" and disabling filtering for the column by setting the enableFiltering property of the column to false. SOURCES: ./docs/tutorial/4-adding-crud-pages/antd/adding-sort-and-filters.md ./docs/tutorial/4-adding-crud-pages/headless/adding-sort-and-filters.md ./docs/advanced-tutorials/search/search.md

Note: If this is the answer you need, then we are very lucky. If not, please wait for someone from the refine core team or the community to try to help you.
extended-salmon
extended-salmonā€¢2y ago
how to use conditional filter in antd table to search can u give us simple example of it
foreign-sapphire
foreign-sapphireā€¢2y ago
extended-salmon
extended-salmonā€¢2y ago
const { searchFormProps, tableProps } = useTable({ onSearch: (values) => { return [ { field: "title", operator: "contains", value: values.title, }, ]; }, }); i want to add another field in that to filter
foreign-sapphire
foreign-sapphireā€¢2y ago
it's array. you can add other values to array
const { searchFormProps, tableProps } = useTable({
onSearch: (values) => {
return [
{
field: "title",
operator: "contains",
value: values.title,
},
{
field: "id",
operator: "eq",
value: values.id,
},
];
},
});
const { searchFormProps, tableProps } = useTable({
onSearch: (values) => {
return [
{
field: "title",
operator: "contains",
value: values.title,
},
{
field: "id",
operator: "eq",
value: values.id,
},
];
},
});
extended-salmon
extended-salmonā€¢2y ago
i want table to be changed while entering values not while clicking on submit
foreign-sapphire
foreign-sapphireā€¢2y ago
you can use onValuesChange prop from antd form
<Form {...searchFormProps} onValuesChange={searchFormProps.onFinish} layout='inline'>
<Form {...searchFormProps} onValuesChange={searchFormProps.onFinish} layout='inline'>
extended-salmon
extended-salmonā€¢2y ago
ok thanks
More Posts
How to add Header into request GLOBALLYI want to add a header for each api call, since my API requires a X-API-KEY header. Anyone know how?Unable to obtain categories from refine strapi demo endpoint using refine, Strapi and chakraUIHello, Iā€™m building a simple CRUD application using refine with a strapi-v4-provider and Chakra-UI amalfunction in installationHow do I go about this error because when I execute npm run dev, the terminal returns an error with reference to defining relations between collections in appwritethere is a reference in this page https://refine.dev/docs/advanced-tutorials/data-provider/appwrite/Disable Autocomplete in InferencersHi, I have two issues with the Autocomplete component in relation fields. A. With big resources, tReset sorting for useTableI have a reset button, which I am using to reset the sorting on the table. Btw I am also doing multiMultiple providers - don't neccesiate default provider?Hi guys, Opening it here for a discussion rather than a github issue. I use multiple providers, butAntd useDrawerForm not clearingWhat is the best way to clear the useDrawerForm when drawer is closed or when form is submitted? RigDefault access-control-casbin with next.js give warning of critical dependencyAfter integrating casbin with refine next.js project, I follow through boiler template but with nextCan I use the antD useTable with a resource or endpoint that is essentially custom?Hi guys, wondering if i'm going about this the wrong way and could use some advice / help if possibl