Skip to content
Snippets Groups Projects
Commit d5c57497 authored by Giuseppe's avatar Giuseppe
Browse files

Removed unused code from scrollable dropdown component

parent 3ce9c89a
No related branches found
No related tags found
No related merge requests found
import { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
import { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap';
import { Observable } from 'rxjs/Observable';
import { DynamicScrollableDropdownModel } from './dynamic-scrollable-dropdown.model';
import { PageInfo } from '../../../../../../core/shared/page-info.model';
import { isNull, isUndefined } from '../../../../../empty.util';
......@@ -8,8 +11,6 @@ import { AuthorityService } from '../../../../../../core/integration/authority.s
import { IntegrationSearchOptions } from '../../../../../../core/integration/models/integration-options.model';
import { IntegrationData } from '../../../../../../core/integration/integration-data';
import { AuthorityValueModel } from '../../../../../../core/integration/models/authority-value.model';
import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap';
import { Observable } from 'rxjs';
@Component({
selector: 'ds-dynamic-scrollable-dropdown',
......@@ -49,24 +50,11 @@ export class DsDynamicScrollableDropdownComponent implements OnInit {
if (this.model.value) {
this.setCurrentValue(this.model.value);
}
console.log(this.optionsList);
this.pageInfo = object.pageInfo;
this.cdr.detectChanges();
})
}
formatItemForInput(item: any): string {
let result: any;
if (isUndefined(item) || isNull(item)) { return '' }
if (typeof item === 'string') { result = item }
if (this.optionsList) {
this.optionsList.forEach((key) => {
console.log(this.optionsList[key]);
});
}
return (typeof item === 'string') ? item : this.inputFormatter(item);
}
inputFormatter = (x: AuthorityValueModel): string => x.display || x.value;
openDropdown(sdRef: NgbDropdown) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment