Skip to content

Commit

Permalink
Fixed #14033 - ListBox | Refactor onChange emitter
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Nov 6, 2023
1 parent d09a905 commit c1df9fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/components/listbox/listbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ export class Listbox implements AfterContentInit, OnInit, ControlValueAccessor,
* Defines how multiple items can be selected, when true metaKey needs to be pressed to select or unselect an item and when set to false selection of each item can be toggled individually. On touch enabled devices, metaKeySelection is turned off automatically.
* @group Props
*/
@Input() metaKeySelection: boolean = true;
@Input() metaKeySelection: boolean = false;
/**
* A property to uniquely identify a value in options.
* @group Props
Expand Down Expand Up @@ -756,6 +756,7 @@ export class Listbox implements AfterContentInit, OnInit, ControlValueAccessor,
value: value
});
}
this.onChange.emit({ originalEvent: event, value: this.value });
}

removeOption(option) {
Expand Down Expand Up @@ -849,7 +850,6 @@ export class Listbox implements AfterContentInit, OnInit, ControlValueAccessor,
.filter((option) => this.isValidOption(option))
.map((option) => this.getOptionValue(option));
this.updateModel(value, event);
this.onChange.emit({ originalEvent: event, value: this.value });

event.preventDefault();
event.stopPropagation();
Expand Down

1 comment on commit c1df9fd

@vercel
Copy link

@vercel vercel bot commented on c1df9fd Nov 6, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.