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

[FluentCheckbox] Add 3-states (check/uncheck/indeterminate) #1022

Merged
merged 9 commits into from
Nov 26, 2023

Conversation

dvoituron
Copy link
Collaborator

[FluentCheckbox] Add 3-states (check/uncheck/indeterminate)

Added these new properties:

  • ThreeState: Gets or sets a value indicating whether the Checkbox will allow three check states rather than two.
  • ShowIndeterminate: Gets or sets a value indicating whether the user can display the indeterminate state by clicking the Checkbox. If this is not the case, the checkbox can be started in the indeterminate state, but the user cannot activate it with the mouse. Default is true.
  • CheckState: Gets or sets the state of the CheckBox: true, false or null.

The current Value and the new CheckState properties are bindable.

Result

The first example has ThreeState = true and the user can switch between Unchecked / Checked / Indeterminate.

The second example has ThreeState = false and the user can only switch between Unchecked / Checked.

The third example has ThreeState = true and ShowIndeterminate = true, so the first state can be Indeterminate (or updated by code), but the user can only switch between Unchecked / Checked.

TheeStates

Unit Tests

Unit tests included.
image

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-1022.westeurope.3.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-1022.westeurope.3.azurestaticapps.net

@vnbaaij
Copy link
Collaborator

vnbaaij commented Nov 26, 2023

Great! Generated SWA works now.

@vnbaaij vnbaaij merged commit 17ec5ed into dev Nov 26, 2023
3 checks passed
@vnbaaij vnbaaij deleted the users/dvoituron/checkbox-threestate branch November 26, 2023 09:55
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-1022.westeurope.3.azurestaticapps.net

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

Successfully merging this pull request may close these issues.

2 participants