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

feat(combo): add selectionMode input, #9832 #9901

Closed
wants to merge 1 commit into from

Conversation

ViktorSlavov
Copy link
Contributor

Closes #9832

Add an input to the combo that allows toggling between selection modes (single / multiple)

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@ViktorSlavov ViktorSlavov requested a review from wnvko July 21, 2021 11:27
@ViktorSlavov ViktorSlavov added ❌ status: awaiting-test PRs awaiting manual verification and removed 🛠️ status: in-development Issues and PRs with active development on them labels Jul 21, 2021
@ViktorSlavov ViktorSlavov marked this pull request as ready for review July 21, 2021 11:27
this._selectionMode = val;
const selection = this.selectedItems();
if (this._selectionMode === ComboSelectionMode.single && selection.length > 1) {
this.setSelection(new Set(this.validateSelectionSize(selection)));
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to validate selection size. setSelection will do this for you.

Suggested change
this.setSelection(new Set(this.validateSelectionSize(selection)));
this.setSelection(new Set(selection));

@Lipata Lipata closed this Jul 23, 2021
@ChronosSF ChronosSF deleted the vslavov/combo-single-select branch June 7, 2024 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IgxCombo with single selection
3 participants