The Coder
The Coder

Reputation: 343

How to filter list in react admin

For some reason in react admin I am having trouble filtering the list on the table. Here's my code

/* eslint-disable */
import * as React from "react";
import { List, Datagrid, TextField, TextInput, ReferenceInput, SelectInput } from 'react-admin';
import GetEntityNames from "./GetEntityName";

const postFilters = [
    <TextInput source="audience_name" label="Search Audience Label" />,
];


const AudienceLabelList = props => (
    <List filters={postFilters} {...props}>
        <Datagrid rowClick="edit">
            <TextField source="id" />
            <TextField source="audience_name" label="Audience Labels" />
            <TextField source="entity_ids" label="Entity_ids" />
            <GetEntityNames source="entity_ids" />
        </Datagrid>
    </List>
);

export default AudienceLabelList;

When I type in an entry on my list, in order for me to see results it has to be an exact match. For example when I search

tags

I want it to return

tags are many

That's not happening I have to search based on exact match for some reason

Upvotes: 0

Views: 1564

Answers (1)

MaxAlex
MaxAlex

Reputation: 3319

In react-admin, filtering is performed only on the server, react-admin only adds filter parameters to the request.

Upvotes: 1

Related Questions