developed-pinkD
Refine•3y ago•
3 replies
developed-pink

Antd setSelectedKeys FilterDropdownProps arguments

Hello,

Goal:
I have a column that is made from a nested object (patient) and renderes the first and last name in there. I want to add a filter and when searching submit patient__icontains=STRING

Current behaviour:
It works if I change the argument in setSelectedKeys to a string (see screenshot 1). However currently its type is restricted to an array. Hence, I added a tsignore.

This is what I do in my hook (screenshot 2).

It works this way, however I am not sure if I am using this correctly since the type restriction is there for a reason I suppose 😉

I also checked out here another thread but this did not help (Nested Filtering in useTable). Please let me know if you have any other suggestions.

EDIT
Very interesting I noticed that when I click "filter" it will automatically submit as a string (hence not typed as array like if I would use setSelectedKeys on the onPressEnter function)

Thanks!
Jörg
image.png
image.png
Was this page helpful?