Add disable behaviour in inputs in search

This commit is contained in:
Konstantinos Triantafyllou 2022-04-12 15:34:33 +03:00
parent 599f590b8e
commit 9893c9d8f9
2 changed files with 5 additions and 8 deletions

View File

@ -269,12 +269,10 @@
<div class="uk-grid uk-flex-middle uk-child-width-1-1 uk-child-width-1-2@m uk-margin-medium-top" uk-grid>
<div
*ngIf="(results && searchUtils.totalResults > 0) || (!loadPaging && oldTotalResults > 0 && searchUtils.status == errorCodes.LOADING)">
<div class="uk-flex uk-flex-middle">
<!-- TODO: Disabled functionality -->
<!-- [isDisabled]="disabled" -->
<div class="uk-width-small uk-margin-right" *ngIf="searchUtils.totalResults >= 50">
<div class="uk-flex uk-flex-middle">>
<div class="uk-width-small uk-margin-right" *ngIf="searchUtils.totalResults >= 50 || disabled">
<div input type="select" placeholder="Results per page" inputClass="flat x-small"
[options]="['5','10','20','50']" [(value)]="searchUtils.size"
[options]="['5','10','20','50']" [(value)]="searchUtils.size" [disabled]="disabled"
(valueChange)="sizeChanged($event)"></div>
</div>
<search-sorting *ngIf="sort"

View File

@ -4,15 +4,14 @@ import {Component, Input, Output, EventEmitter} from '@angular/core';
selector: 'search-sorting',
template: `
<div class="uk-width-small">
<!-- TODO: Disabled functionality -->
<div input *ngIf="(entityType != 'community' && entityType != 'stakeholder' )"
type="select" placeholder="Sort by" inputClass="flat x-small"
[options]="optionsA" [(value)]="sortBy"
[options]="optionsA" [(value)]="sortBy" [disabled]="isDisabled"
(valueChange)="sortByChanged()"></div>
<div input *ngIf="(entityType == 'community' || entityType == 'stakeholder')"
type="select" placeholder="Sort by" inputClass="flat x-small"
[options]="optionsB" [(value)]="sortBy"
[options]="optionsB" [(value)]="sortBy" [disabled]="isDisabled"
(valueChange)="sortByChanged()"></div>
</div>
`