Skip to content

Commit

Permalink
Merged in bugfix/SHIBUI-646 (pull request #166)
Browse files Browse the repository at this point in the history
SHIBUI-646 Removed show more link

* SHIBUI-646 Removed show more link

* SHIBUI-646 Fixed issue with loading provider before filter

Approved-by: Shibui Jenkins <shibui.jenkins@gmail.com>
Approved-by: Ryan Mathis <rmathis@unicon.net>
  • Loading branch information
rmathis committed Aug 17, 2018
1 parent e6f8510 commit 6232ce8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export class ProviderFilterListComponent implements OnDestroy {
this.filters$ = this.store.select(fromFilter.getAdditionalFilters);
this.provider$ = this.store.select(fromProvider.getSelectedProvider).pipe(skipWhile(p => !p));
this.provider$
.pipe(takeUntil(this.ngUnsubscribe))
.pipe(
takeUntil(this.ngUnsubscribe)
)
.subscribe(p => {
this.store.dispatch(new LoadFilterRequest(p.resourceId));
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<router-outlet></router-outlet>
<ng-container *ngIf="provider$ | async">
<router-outlet></router-outlet>
</ng-container>
10 changes: 0 additions & 10 deletions ui/src/app/shared/autocomplete/autocomplete.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,5 @@
<li class="dropdown-item dropdown-item-noresults" *ngIf="matches && matches.length === 0 && !processing">
{{ noneFoundText }}
</li>
<li class="dropdown-item"
*ngIf="showMoreAvailable && matches"
[class.active]="state.currentState.selected === matches.length"
[class.focused]="state.currentState.focused === matches.length"
(click)="handleViewMore($event)"
(mousedown)="handleViewMore($event)"
(keydown.enter)="handleViewMore($event)"
[id]="this.getOptionId(matches.length)">
{{ showMoreText }}
</li>
</ul>
</div>
9 changes: 1 addition & 8 deletions ui/src/app/shared/autocomplete/autocomplete.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,12 @@ const INPUT_FIELD_INDEX = -1;
}
]
})
export class AutoCompleteComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit, ControlValueAccessor {
export class AutoCompleteComponent implements OnInit, OnDestroy, AfterViewInit, ControlValueAccessor {
@Input() defaultValue = '';
@Input() matches: string[] = [];
@Input() id: string;
@Input() autoSelect = false;
@Input() noneFoundText = 'No Options Found';
@Input() showMoreText = 'Show More...';
@Input() limit = 0;
@Input() processing = false;
@Input() dropdown = false;
Expand Down Expand Up @@ -119,12 +118,6 @@ export class AutoCompleteComponent implements OnInit, OnDestroy, OnChanges, Afte
this.listItems.changes.subscribe((changes) => this.setElementReferences(changes));
}

ngOnChanges(changes: SimpleChanges): void {
if (changes.matches) {
this.showMoreAvailable = !!this.limit && this.matches && this.matches.length >= this.limit;
}
}

writeValue(value: any): void {
this.input.setValue(value);
}
Expand Down

0 comments on commit 6232ce8

Please sign in to comment.