это мой файл component.ts
source: LocalDataSource;
nameAutocompletee =[
{
id: 1,
name: 'Warehouse 1',
},
{
id: 1,
name: 'Warehouse 2',
},
{
id: 1,
name: 'Warehouse 23',
},
{
id: 1,
name: 'Warehouse 12',
},
{
id: 1,
name: 'Warehouse 5',
},
];
settings = {
add: {
addButtonContent: '<span class="">Add</span>',
createButtonContent: '<i class="nb-checkmark"></i>',
cancelButtonContent: '<i class="nb-close"></i>',
confirmCreate: true,
},
edit: {
editButtonContent: '<i class="nb-edit"></i>',
saveButtonContent: '<i class="nb-checkmark"></i>',
cancelButtonContent: '<i class="nb-close"></i>',
confirmSave: true,
},
delete: {
deleteButtonContent: '<i class="nb-trash"></i>',
confirmDelete: true,
},
columns: {
name: {
title: 'Name',
type: 'html',
editor: {
type: 'completer',
config: {
completer: {
data: this.nameAutocompletee,
searchFields: 'name',
titleField: 'name'
},
},
}
},
address: {
title: 'Address',
type: 'html',
},
},
};
constructor(private orderManagerService: OrderManagerService) {
this.GetCompanyDetails();
}
ngOnInit() {
this.GetCompanyDetails();
}
GetCompanyDetails()
{
this.orderManagerService.GetCreateNewOrders().subscribe(res => {
this.source = new LocalDataSource();
this.source.load(res.createOrders);
},
);
}