Skip to content

Conversation

SbrowneA
Copy link

@SbrowneA SbrowneA commented Oct 28, 2022

Hi,

This PR aims to resolve what is described in issue#172, where other properties of an object are cleared when an item is selected.
To prevent properties from being excluded, I've simply added a new field to the list item that stores the other properties and then deconstructs the object so that the component provides the objects in their original structure.
I've tested this in single-select and multiselect mode and there have been no issues.

Keen to hear on your feedback,
Thanks.

samuelbrowne added 4 commits September 15, 2022 13:39
- Adding custom properties to demo data
- changing use of the deconstruct/spread operator (...{}), in MultiSelectComponent.getSourceObj to use Object.assign(), instead.
# Conflicts:
#	src/app/components/select/multiple-demo.ts
import { NG_VALUE_ACCESSOR, ControlValueAccessor } from "@angular/forms";
import { ListItem, IDropdownSettings } from "./multiselect.model";
import { ListFilterPipe } from "./list-filter.pipe";
import {Component, HostListener, forwardRef, Input, Output, EventEmitter, ChangeDetectionStrategy, ChangeDetectorRef} from '@angular/core';
Copy link
Author

Choose a reason for hiding this comment

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

These were automatic formatting changes made by the linter, let me know if you need them reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant