Skip to content

Commit f7e1a8c

Browse files
brunoromeiroalinelariguet
authored andcommitted
fix(multiselect): corrige emissão de evento pela listagem
Ajusta emissão de evento quando utilizado a listagem de itens. Fixes DTHFUI-6424
1 parent 90b7f74 commit f7e1a8c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

projects/ui/src/lib/components/po-field/po-multiselect/po-multiselect-base.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,14 +569,14 @@ describe('PoMultiselectBaseComponent:', () => {
569569
expect(component.updateVisibleItems).toHaveBeenCalled();
570570
});
571571

572-
it('updateSelectedOptions: should set `0` for `lastLengthModel` if `newOptions.lenght` is `0`', () => {
572+
it('updateSelectedOptions: should set `undefined` for `lastLengthModel` if `newOptions.lenght` is `0`', () => {
573573
spyOn(component, 'updateVisibleItems');
574574
const params = [];
575575
const options = [];
576576
component.filterService = poMultiselectFilterServiceStub;
577577
component['updateSelectedOptions'](params, options);
578578
expect(component.selectedOptions).toEqual([]);
579-
expect(component.lastLengthModel).toBe(0);
579+
expect(component.lastLengthModel).toBeUndefined();
580580
expect(component.updateVisibleItems).toHaveBeenCalled();
581581
});
582582

projects/ui/src/lib/components/po-field/po-multiselect/po-multiselect-base.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ export abstract class PoMultiselectBaseComponent implements ControlValueAccessor
625625
this.selectedOptions = [];
626626

627627
if (newOptions.length === 0) {
628-
this.lastLengthModel = 0;
628+
this.lastLengthModel = undefined;
629629
}
630630

631631
if (this.filterService) {

0 commit comments

Comments
 (0)