search multiple antd columns field from search box

how can we search multiple columns field from a search box
conscious-sapphire
conscious-sapphireβ€’453d 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.
correct-apricot
correct-apricotβ€’453d ago
how to use conditional filter in antd table to search can u give us simple example of it
eastern-cyan
eastern-cyanβ€’453d ago
correct-apricot
correct-apricotβ€’453d 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
eastern-cyan
eastern-cyanβ€’453d 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,
},
];
},
});
correct-apricot
correct-apricotβ€’453d ago
i want table to be changed while entering values not while clicking on submit
eastern-cyan
eastern-cyanβ€’453d ago
you can use onValuesChange prop from antd form
<Form {...searchFormProps} onValuesChange={searchFormProps.onFinish} layout='inline'>
<Form {...searchFormProps} onValuesChange={searchFormProps.onFinish} layout='inline'>
correct-apricot
correct-apricotβ€’453d 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 possiblgoogle authentication popup issue.okay first off what i want: the integrated google authentication to work. what i have done: 1. creaRefine _ Compiled with problems:Hi, While compiling a refine code, I have the next error: TS2786: 'ReactApexChart' cannot be used Inferencer date inferring is too sensitiveHi πŸ™‚ Another issue I've encountered. I have a number field, that the Inferencer recognizes as a DatuseParams, useResource giving different results in different context.I tried to get the resourceName, actions, params by using one of this hook inside `react-router-v6` Inferencer disregards null-value fieldsHi there πŸ‘‹ So I'm making actual progress using the library with the modifications I've used to the Hi pinksheep 3388 can you give us `npmHi @sheepndreams, can you give us `npm run refine whoami` output for debug ?Inferencer - how to use a diferent identifer idHi, I want to use the Inferencer (MUI) to generate the views for my data. However, my data use theUse fieldTransformerHey😩 guys can some someone send me an example of how I can use fieldTransformer const handleTransfAuth Azure B2C with Next.jsI am trying to implement authentication with azure B2C with next, however in the doc there are some Preview Image on edit page loadHi ! how do in ensure that when I go to my edit page, it shows image on my Upload component ? When