question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to avoid triggering dot notation in filters input source and use it as string

See original GitHub issue

Hi,

I would like to use nested properties filters https://api-platform.com/docs/core/filters/#filtering-on-nested-properties but in order to do so I need to provide querystring like this endpoint?city.name=search which I cannot do because react-admin filter will generate endpoint?city[name]=search out of next example due to dot notation thing.

<Filter {...props}>
    <TextInput label='City' source='city.name' alwaysOn />
</Filter>

It looks like it goes into redux-form and jsx feature set, but how do I escape dot in this case?

Cheers.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
diimppcommented, Nov 5, 2018

@modiodio Hi

I’ve extended vendor SearchFilter into my own src/Filter/SearchFileter and overloaded apply method with replacement of __ with ., therefore all subsequent php-side dot notion logic was untouched and working as before.

1reaction
mauchedecommented, Aug 1, 2018

Hi @diimpp,

Thank you for the report. I did not use yet a nested filter, so I can not give any solutions now. But we currently work a lot on the filter system. I will check this soon and I will update this issue when I will have a solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Filter input text only accept number and dot vue.js
I needed my input to allow only digits, so no e symbol, plus, minus nor . . Vue seems funky and doesn't re-trigger...
Read more >
Event filtering for Azure Event Grid - Microsoft Learn
Describes how to filter events when creating an Azure Event Grid ... For custom input schema, use the event data fields (like data.key1...
Read more >
Operators available for filters and queries
The system provides a set of operators for use with filters, condition builders, and encoded queries. The data type of a field determines ......
Read more >
Variable filters - Octopus Deploy
The Substring filter extracts a range of characters from the input and outputs them. If two arguments are supplied, they are interpreted as...
Read more >
Adding and editing user-defined dashboard filters | Looker
In the Field to Filter section, for each tile, choose which field will be affected by the filter, or choose not to apply...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found