Replies: 3 comments 3 replies
-
You may look for issues: |
Beta Was this translation helpful? Give feedback.
0 replies
-
Set your filters as a state just after your data is loaded const [filters, setFilters] =useState([])
const columns: ColumnsType<DataType> = [
{
title: "Name",
dataIndex: "name",
filters: filters,
setData(remoteData)
setFilters(remoteData.map(item=>{
const key = item.name.split(' ')[0]
return {
text: key,
value: key
}
})) |
Beta Was this translation helpful? Give feedback.
3 replies
-
I know It's been a while but maybe this is useful for someone, you can achieve that like this:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Reproduction link
Steps to reproduce
Just open the sandbox
What is expected?
I expect a way to be possible to set the filters of the column header, based on the value of that column on the dataSource dynamically. Lets say we have the following dataSource that comes from a server after a request:
What is actually happening?
You can only set the values of the "filters" previously because you need to pass the value of the filters to the "columns" of the table.
I spent a lot of my time trying to figure out a way to do this in a good method but I could'nt figure out anything to do this behaviour.
Beta Was this translation helpful? Give feedback.
All reactions