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

Add displayNull option in NullableBooleanInput and document it #4365

Merged
merged 2 commits into from
Jan 31, 2020

Conversation

JulienMattiussi
Copy link
Contributor

@JulienMattiussi JulienMattiussi commented Jan 28, 2020

Closes #4362

Issue

When a NullableBooleanInput has a null value, we never see the custom label for this null value

Solution

Add displayNull prop in NullableBooleanInput to allow it to display a custom null label

It simply override needed TextField props for this behaviour

  • SelectProps: {displayEmpty: true }
  • InputLabelProps: { shrink: true }

Documentation

image

@JulienMattiussi JulienMattiussi added WIP Work In Progress RFR Ready For Review and removed WIP Work In Progress labels Jan 28, 2020
@fzaninotto
Copy link
Member

Please PR against next and add an automated test

@fzaninotto fzaninotto added this to the 3.2.0 milestone Jan 31, 2020
@JulienMattiussi JulienMattiussi changed the base branch from master to next January 31, 2020 09:45
@fzaninotto fzaninotto changed the base branch from next to master January 31, 2020 09:57
@fzaninotto fzaninotto changed the base branch from master to next January 31, 2020 09:57
@JulienMattiussi JulienMattiussi force-pushed the nullable-input-label branch 2 times, most recently from 26f8a4d to d80e3ba Compare January 31, 2020 10:06
@fzaninotto fzaninotto merged commit bffab99 into next Jan 31, 2020
@fzaninotto fzaninotto deleted the nullable-input-label branch January 31, 2020 10:22
@sliterok
Copy link
Contributor

I think you should mention in the documentation that you should add new messages as i18n provider for admin component so that it would work. Just wasted 20 mins of my life trying to figure out what's wrong.

@djhi
Copy link
Contributor

djhi commented Aug 19, 2020

I think you should mention in the documentation that you should add new messages as i18n provider for admin component so that it would work. Just wasted 20 mins of my life trying to figure out what's wrong.

Sure, maybe you can open a pull request?

@sliterok
Copy link
Contributor

I think you should mention in the documentation that you should add new messages as i18n provider for admin component so that it would work. Just wasted 20 mins of my life trying to figure out what's wrong.

Sure, maybe you can open a pull request?

Done! #5172

@Luwangel
Copy link
Contributor

Thanks @sliterok!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants