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.

Custom filter form does'nt work

See original GitHub issue

What you were expecting:

I would like to create a custom filter form submitted by a button.

What happened instead:

I took the example in the doc, made quick adaptation but I have an error when I put any of react-admin input field in the form. https://marmelab.com/react-admin/FilteringTutorial.html#custom-filter-form

Related code:

https://codesandbox.io/s/custom-filter-form-4b5of1

Error in the console :

The above error occurred in the <TextInput> component:

TextInput@https://4b5of1.sse.codesandbox.io/index.bundle.js:104832:21
span
./node_modules/@emotion/react/dist/emotion-element-6a883da9.browser.esm.js/withEmotionCache/<@https://4b5of1.sse.codesandbox.io/index.bundle.js:612:66
Box@https://4b5of1.sse.codesandbox.io/index.bundle.js:41027:72
div
./node_modules/@emotion/react/dist/emotion-element-6a883da9.browser.esm.js/withEmotionCache/<@https://4b5of1.sse.codesandbox.io/index.bundle.js:612:66
Box@https://4b5of1.sse.codesandbox.io/index.bundle.js:41027:72
form
FilterForm@https://4b5of1.sse.codesandbox.io/index.bundle.js:158499:101
div
./node_modules/@emotion/react/dist/emotion-element-6a883da9.browser.esm.js/withEmotionCache/<@https://4b5of1.sse.codesandbox.io/index.bundle.js:612:66
Toolbar@https://4b5of1.sse.codesandbox.io/index.bundle.js:35914:82
./node_modules/@emotion/react/dist/emotion-element-6a883da9.browser.esm.js/withEmotionCache/<@https://4b5of1.sse.codesandbox.io/index.bundle.js:612:66
./node_modules/ra-ui-materialui/dist/esm/list/ListToolbar.js/ListToolbar<@https://4b5of1.sse.codesandbox.io/index.bundle.js:108397:19
div
div
./node_modules/@emotion/react/dist/emotion-element-6a883da9.browser.esm.js/withEmotionCache/<@https://4b5of1.sse.codesandbox.io/index.bundle.js:612:66
ListView@https://4b5of1.sse.codesandbox.io/index.bundle.js:108512:14
ListContextProvider@https://4b5of1.sse.codesandbox.io/index.bundle.js:81592:17
ResourceContextProvider@https://4b5of1.sse.codesandbox.io/index.bundle.js:84503:20
ListBase@https://4b5of1.sse.codesandbox.io/index.bundle.js:81439:20
List@https://4b5of1.sse.codesandbox.io/index.bundle.js:108169:20
PostList@https://4b5of1.sse.codesandbox.io/index.bundle.js:158996:79
RenderedRoute@https://4b5of1.sse.codesandbox.io/index.bundle.js:147164:7
Routes@https://4b5of1.sse.codesandbox.io/index.bundle.js:147595:7
ResourceContextProvider@https://4b5of1.sse.codesandbox.io/index.bundle.js:84503:20
Resource@https://4b5of1.sse.codesandbox.io/index.bundle.js:84407:18
RenderedRoute@https://4b5of1.sse.codesandbox.io/index.bundle.js:147164:7
Routes@https://4b5of1.sse.codesandbox.io/index.bundle.js:147595:7
ErrorBoundary@https://4b5of1.sse.codesandbox.io/index.bundle.js:139108:37
div
main
div
div
./node_modules/@emotion/react/dist/emotion-element-6a883da9.browser.esm.js/withEmotionCache/<@https://4b5of1.sse.codesandbox.io/index.bundle.js:612:66
Layout@https://4b5of1.sse.codesandbox.io/index.bundle.js:106015:14
__WEBPACK_DEFAULT_EXPORT__
div
RenderedRoute@https://4b5of1.sse.codesandbox.io/index.bundle.js:147164:7
Routes@https://4b5of1.sse.codesandbox.io/index.bundle.js:147595:7
CoreAdminRoutes@https://4b5of1.sse.codesandbox.io/index.bundle.js:84268:79
RenderedRoute@https://4b5of1.sse.codesandbox.io/index.bundle.js:147164:7
Routes@https://4b5of1.sse.codesandbox.io/index.bundle.js:147595:7
CoreAdminUI@https://4b5of1.sse.codesandbox.io/index.bundle.js:84338:14
AdminUI@https://4b5of1.sse.codesandbox.io/index.bundle.js:94709:24
InnerThemeProvider@https://4b5of1.sse.codesandbox.io/index.bundle.js:40257:70
ThemeProvider@https://4b5of1.sse.codesandbox.io/index.bundle.js:39960:7
ThemeProvider@https://4b5of1.sse.codesandbox.io/index.bundle.js:40279:7
ThemeProvider@https://4b5of1.sse.codesandbox.io/index.bundle.js:107301:20
ResourceDefinitionContextProvider@https://4b5of1.sse.codesandbox.io/index.bundle.js:84576:14
NotificationContextProvider@https://4b5of1.sse.codesandbox.io/index.bundle.js:90898:20
I18nContextProvider@https://4b5of1.sse.codesandbox.io/index.bundle.js:90341:14
Router@https://4b5of1.sse.codesandbox.io/index.bundle.js:147531:7
HistoryRouter@https://4b5of1.sse.codesandbox.io/index.bundle.js:91144:20
InternalRouter@https://4b5of1.sse.codesandbox.io/index.bundle.js:91064:20
BasenameContextProvider@https://4b5of1.sse.codesandbox.io/index.bundle.js:91116:20
AdminRouter@https://4b5of1.sse.codesandbox.io/index.bundle.js:91053:19
QueryClientProvider@https://4b5of1.sse.codesandbox.io/index.bundle.js:144827:16
StoreContextProvider@https://4b5of1.sse.codesandbox.io/index.bundle.js:91461:17
CoreAdminContext@https://4b5of1.sse.codesandbox.io/index.bundle.js:84207:24
AdminContext@https://4b5of1.sse.codesandbox.io/index.bundle.js:94654:14
Admin@https://4b5of1.sse.codesandbox.io/index.bundle.js:111483:24

React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary.

Environment

  • React-admin version: 4.3.1
  • React version: 17.0.1
  • Browser: Chrome/Firefox

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
btbenedicommented, Sep 23, 2022

Thanks @WiXSL, this was driving me nuts today trying to figure out why my code wasn’t working.

1reaction
fchaslescommented, Sep 19, 2022

Thanks for the quick support! 👍🏻🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom Filter doesn't work - WordPress.org
I'm using the wp event manager plugin on WordPress and I'm trying to custom it. I created some custom fields in the back-end...
Read more >
Form filter not working in Access 2007 - Microsoft Community
If your form filters do not work, be sure to add all locations to your "trusted list". Within Access, add any location that...
Read more >
Why Custom Filter JS code doesn't work on Lookup field? [Fixed]
One such tricky situation is that of applying custom filter to fields using JavaScript in Dynamics 365 Customer Engagement apps.
Read more >
Why custom filter is not running in angular? - Stack Overflow
When you using type="email" in the input field , if only email is valid then the value gonna assign to ng-model variable.
Read more >
Custom Filter using AND error - Designer - Alteryx Community
Solved: Hi everyone, newbie here. I tried using custom filter given multiple conditions, but it somehow fail for "malformed call". I then.
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