Skip to content

Commit

Permalink
fix(admin-ui): Fix facet value selection with duplicated labels
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Apr 25, 2024
1 parent b9eb7db commit 3a9c317
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[typeahead]="searchInput$"
multiple="true"
appendTo="body"
bindLabel="name"
bindLabel="id"
[disabled]="disabled || readonly"
[ngModel]="value"
(change)="onChange($event)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ export class FacetValueSelectorComponent implements OnInit, OnDestroy, ControlVa
disabled = false;
value: Array<string | FacetValueFragment>;
private subscription: Subscription;
constructor(private dataService: DataService, private changeDetectorRef: ChangeDetectorRef) {}
constructor(
private dataService: DataService,
private changeDetectorRef: ChangeDetectorRef,
) {}

ngOnInit(): void {
this.initSearchResults();
Expand Down Expand Up @@ -116,6 +119,9 @@ export class FacetValueSelectorComponent implements OnInit, OnDestroy, ControlVa
if (this.readonly) {
return;
}
for (const sel of selected) {
console.log(`selected: ${sel.facet.name}:${sel.code}`);
}
this.selectedValuesChange.emit(selected);
if (this.onChangeFn) {
const transformedValue = this.transformControlValueAccessorValue(selected);
Expand Down

0 comments on commit 3a9c317

Please sign in to comment.