Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All the components should tell the differences of undefined and null #6139

Closed
benjycui opened this issue May 15, 2017 · 3 comments
Closed

All the components should tell the differences of undefined and null #6139

benjycui opened this issue May 15, 2017 · 3 comments

Comments

@benjycui
Copy link
Contributor

It is confusing now, some components need undefined when we want to clear value of a property, but others need null.

We should unify the behaviors of all the components, and they should:

  1. Treat undefined as undefined, even if developers pass undefined to components explicit
  2. Treat null as defined, and it means clear the value of a property

This will be a breaking change, so we should do this in next major version.

cc @warmhug

@benjycui benjycui mentioned this issue May 15, 2017
29 tasks
@paranoidjk
Copy link
Contributor

+1 for this

@otakustay
Copy link

+1, undefined should mean "a unintentional empty value" so it could be a hint of a future error, leave null as the behavior of intentional clear value

@afc163
Copy link
Member

afc163 commented Mar 13, 2020

This had been resolved in antd v4.

@afc163 afc163 closed this as completed Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants