React-admin: FormdataConsumer empty value fields not inside formdata object

Created on 19 Aug 2020  路  9Comments  路  Source: marmelab/react-admin

Filling in a form, if I leave a field empty, "", that field (key, val) is deleted from FormdataConsumer data object. So I loose the empty fields basically as if they're not part of this module.

I need to be able to retrieve the empty fields as well.

"react-admin": "^3.5.0",
"react": "^16.13.1",
Chrome: v83

  1. Field initially has value: 'new order no'
    Field Initial

  2. Then I empty the field value:
    Field Empty

  3. But it still sends the old value in the params: 'number_new_order: new order no'
    Network params

  4. FormDataConsumer does not contain the field anymore when field value is empty String ""
    FormData

needs more info

All 9 comments

Please follow the issue template

Please follow the issue template

I updated the issue.
Any help appreciated!

ping ??

Thanks for reporting this. In order to fix an issue we have to reproduce it, please provide a sample application showing the issue by forking the following CodeSandbox (https://codesandbox.io/s/github/marmelab/react-admin/tree/master/examples/simple).

No news for some time, closing.

so nice :-(

thanks

@joebordes we asked the author to provide a way to report the issue a month ago. He never came back to us. So we closed the issue. What gets you confused?

If you have the same bug, please provide a way to reproduce it, and we'll reopen the issue.

your little effort to try to reproduce it, or the lack of any feedback if you have

but you're free to manage it as you please

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kmaschta picture Kmaschta  路  3Comments

kopax picture kopax  路  3Comments

alukito picture alukito  路  3Comments

Dragomir-Ivanov picture Dragomir-Ivanov  路  3Comments

kikill95 picture kikill95  路  3Comments