Bug fix in sorting values in search filters.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@52815 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
96e3061163
commit
2bc93bba6f
|
@ -47,7 +47,7 @@
|
||||||
<span class="filterName"><div title = "{{value.name}}">
|
<span class="filterName"><div title = "{{value.name}}">
|
||||||
<input [disabled]="isDisabled" [(ngModel)]="value.selected" type="checkbox" (ngModelChange)="close(); filterChange(value.selected)" />
|
<input [disabled]="isDisabled" [(ngModel)]="value.selected" type="checkbox" (ngModelChange)="close(); filterChange(value.selected)" />
|
||||||
{{_formatName(value)}} </div></span>
|
{{_formatName(value)}} </div></span>
|
||||||
<span class="filterNumber" *ngIf = "showResultCount === true" > ({{value.number}})</span>
|
<span class="filterNumber" *ngIf = "showResultCount === true" > ({{value.number|number}})</span>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<hr *ngIf="filter.countSelectedValues > 0 && (filter.values.length-filter.countSelectedValues ) > 0 " class="uk-grid-divider uk-margin-small">
|
<hr *ngIf="filter.countSelectedValues > 0 && (filter.values.length-filter.countSelectedValues ) > 0 " class="uk-grid-divider uk-margin-small">
|
||||||
|
|
|
@ -104,17 +104,17 @@ export class SearchFilterComponent {
|
||||||
return selected;
|
return selected;
|
||||||
|
|
||||||
}
|
}
|
||||||
getNotSelectedValues(filter, sortBy):any{
|
getNotSelectedValues(filter, sortBy:string = "num"):any{
|
||||||
var notSselected = [];
|
var notSselected = [];
|
||||||
if(filter.countSelectedValues >0){
|
//if(filter.countSelectedValues >0){
|
||||||
for (var i=0; i < filter.values.length; i++){
|
for (var i=0; i < filter.values.length; i++){
|
||||||
if(!filter.values[i].selected){
|
if(!filter.values[i].selected){
|
||||||
notSselected.push(filter.values[i]);
|
notSselected.push(filter.values[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
//}else {
|
||||||
notSselected = filter.values;
|
// notSselected = filter.values;
|
||||||
}
|
//}
|
||||||
|
|
||||||
if(sortBy == "name"){
|
if(sortBy == "name"){
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue