ps-ng-select works one shot
This commit is contained in:
@@ -4,6 +4,7 @@ import { NgSelectDemoComponent } from './ng-select-demo/ng-select-demo.component
|
||||
import { NgSelectDemoRoutingModule } from './ng-select-demo-routing.module';
|
||||
import { NgSelectModule } from '@ng-select/ng-select';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { PsSelectorsModule } from '@poweredsoft/ngx-cdk-ui';
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +14,8 @@ import { FormsModule } from '@angular/forms';
|
||||
CommonModule,
|
||||
NgSelectModule,
|
||||
FormsModule,
|
||||
NgSelectDemoRoutingModule
|
||||
NgSelectDemoRoutingModule,
|
||||
PsSelectorsModule //our ng select module
|
||||
]
|
||||
})
|
||||
export class NgSelectDemoModule { }
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
|
||||
|
||||
<ps-ng-select [dataSource]="merchantDataSource" ></ps-ng-select>
|
||||
@@ -1,4 +1,10 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, ChangeDetectorRef } from '@angular/core';
|
||||
import { MerchantService } from 'src/app/data/services/merchant.service';
|
||||
|
||||
import { IMerchant } from 'src/app/data/services/IMerchant';
|
||||
import { Observable, Subject } from 'rxjs';
|
||||
import { map, distinctUntilChanged, debounceTime } from 'rxjs/operators';
|
||||
import { IDataSource, ISimpleFilter } from '@poweredsoft/data';
|
||||
|
||||
@Component({
|
||||
selector: 'ps-ng-select-demo',
|
||||
@@ -7,9 +13,18 @@ import { Component, OnInit } from '@angular/core';
|
||||
})
|
||||
export class NgSelectDemoComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
merchantDataSource: IDataSource<IMerchant>;
|
||||
|
||||
|
||||
ngOnInit(): void {
|
||||
constructor(private merchantService: MerchantService,
|
||||
) {
|
||||
this.merchantDataSource = merchantService.createDataSource(); //Assign the dataSource
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user