Skip to content

Conversation

@JoelLeupp
Copy link
Collaborator

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Adds a new angular value accessor which allows to assign checkboxes a value and bind it to an array form control.
It would behave like a multiselect but with six-checkboxes.

This can be very usefull for examples like this where in the form you only want to have a list of roles instead of a boolean for every role which is the default behavior of a checkbox (CheckboxValueAccessor):

image

πŸ“ Checklist

  • I have linked an issue or discussion.
  • It's submitted to the main branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • I have updated the documentation accordingly.
  • All tests are passing
  • New/updated tests are included
  • I have updated the "upcoming" section inside docs/changelog.md explaining the changes I contributed

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:


@Directive({
selector: 'six-checkbox',
selector: 'six-checkbox:not([six-multiple])',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't apply this value accessor if six-multiple is set but apply the new value accessor instead. Otherwise these to value accessor would collide

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