Skip to content

Commit

Permalink
fix: function adjustments #734
Browse files Browse the repository at this point in the history
  • Loading branch information
MadalenaCampos committed Jul 12, 2023
1 parent eb7ea5f commit a4f1563
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion projects/ion/src/lib/chip-group/chip-group.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,19 @@ export class IonChipGroupComponent {
if (chipSelected.multiple && chipSelected.selected) {
return;
}

const isChipSelected = chipSelected.selected;

if (!this.multiple) {
this.clearChips();
}

if (!chipSelected.multiple || !isChipSelected) {
chipSelected.selected = !isChipSelected;
}

if (this.required) {
this.checkRequired(chipSelected);
return;
}

this.selected.emit(chipSelected);
Expand Down

0 comments on commit a4f1563

Please sign in to comment.