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

Checkbox - bool? - Reset to Indeterminate status by clicking #1546

Closed
boukenka opened this issue May 12, 2021 · 6 comments
Closed

Checkbox - bool? - Reset to Indeterminate status by clicking #1546

boukenka opened this issue May 12, 2021 · 6 comments
Labels
enhancement New feature or request
Milestone

Comments

@boukenka
Copy link
Contributor

boukenka commented May 12, 2021

Is your feature request related to a problem? Please describe.
Today, if you have a checkbox with the type bool?, it is not possible by clicking the checkbox to reset to an Indeterminate status.

Describe the solution you'd like
I would like to have the following cycle by clicking (if the original status is Indeterminate) :
true, false, indeterminate, true, false, indeterminate, true, false ...
Maybe with a boolean option whose name is 'ResetToIndeterminate' which only applies when the checkbox type is bool??

Sans titre

@boukenka boukenka added the enhancement New feature or request label May 12, 2021
@boukenka boukenka changed the title Checkbox - bool? - Reset to original value by clicking Checkbox - bool? - Reset to Indeterminate status by clicking May 12, 2021
@henon
Copy link
Collaborator

henon commented May 14, 2021

Sure, another suggestion for the parameter's name: TriState
Would be very easy to add this. Will you PR?

@boukenka
Copy link
Contributor Author

@henon Yes

@boukenka
Copy link
Contributor Author

I have tried to push the changes (based on the DEV branch). Getting the error message below :

image

Here are the steps I have followed :

1. git clone --branch dev https://github.com/Garderoben/MudBlazor.git
2. git branch tristate
3. git checkout tristate
4. ...modification of the code ....
5. git add -A
6. git commit -m "TriState parameter addition for MudCheckBox"
7. git push --set-upstream origin tristate

@henon
Copy link
Collaborator

henon commented May 15, 2021

Fork it, push your branch to your fork, then open up a PR against dev on MudBlazor

@boukenka
Copy link
Contributor Author

Thanks for the instructions. It is done.

@henon henon added this to the 5.0.9 milestone May 15, 2021
@henon
Copy link
Collaborator

henon commented May 15, 2021

Done.

For the changelog:

  • MudCheckbox with T="bool?": added a parameter TriState which allows to cycle it to indeterminate (True -> False -> Null -> True)

@henon henon closed this as completed May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants