23 lines
544 B
TypeScript
23 lines
544 B
TypeScript
import { DataField } from './DataField';
|
|
import { FormGroup } from '@angular/forms'
|
|
|
|
export class AutocompleteData extends DataField<AutocompleteData>{
|
|
|
|
public type:string;
|
|
public url:string;
|
|
|
|
buildForm():FormGroup{
|
|
return this.formBuilder.group({
|
|
label:[this.label],
|
|
type:[this.type],
|
|
url:[this.url]
|
|
})
|
|
}
|
|
|
|
fromJSONObject(item:any):AutocompleteData{
|
|
this.type = item.type;
|
|
this.url = item.url;
|
|
this.label = item.label;
|
|
return this;
|
|
}
|
|
} |