Skip to content

Commit

Permalink
feat: add required to chip-group #734
Browse files Browse the repository at this point in the history
  • Loading branch information
MadalenaCampos committed Jul 11, 2023
1 parent f916210 commit b23d8de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 3 additions & 2 deletions projects/ion/src/lib/chip/chip.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@ export class ChipComponent implements OnInit, AfterViewInit, DoCheck {

select(): void {
this.toggleDropdown();
if (!this.options) {
!this.selected;
if (!this.options.length) {
this.selected = !this.selected;
}

this.events.emit({
selected: this.selected,
disabled: this.disabled,
Expand Down
6 changes: 0 additions & 6 deletions stories/ChipGroup.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,3 @@ export const WithDropdown = Template.bind({});
WithDropdown.args = {
chips: chipsWithOptions,
};

export const WithRequired = Template.bind({});
WithRequired.args = {
chips,
required: true,
};

0 comments on commit b23d8de

Please sign in to comment.