Skip to content

Commit

Permalink
fix: show the message "No results found" only when the items contain …
Browse files Browse the repository at this point in the history
…some items but all of them are filtered

#11 (comment)
  • Loading branch information
optimistex committed Feb 9, 2018
1 parent 2dbf964 commit 26af3ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/lib/ngx-select/ngx-select.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

<!-- options template -->
<ul #choiceMenu role="menu" class="ngx-select__choices ui-select-choices dropdown-menu"
[class.show]="optionsOpened ">
[class.show]="optionsOpened && subjOptions.value.length">
<li class="ngx-select__item-group" role="menuitem"
*ngFor="let opt of optionsFiltered; trackBy: trackByOption; let idx=index">
<div class="divider dropdown-divider" *ngIf="opt.type === 'optgroup' && (idx > 0)"></div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/lib/ngx-select/ngx-select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class NgxSelectComponent implements ControlValueAccessor, DoCheck, AfterC
private defaultValueDiffer: IterableDiffer<any[]>;
private actualValue: any[] = [];

private subjOptions = new BehaviorSubject<TSelectOption[]>([]);
public subjOptions = new BehaviorSubject<TSelectOption[]>([]);
private subjSearchText = new BehaviorSubject<string>('');

private subjOptionsSelected = new BehaviorSubject<NgxSelectOption[]>([]);
Expand Down

0 comments on commit 26af3ab

Please sign in to comment.