We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Observable instead of DataManager

Hi Team,

I want use observable instead of DataManager, I have added in template code like this:
<div class="form-group">
<ejs-autocomplete formControlName="personId" name="firstName" [dataSource]='filteredPersons | async' allowCustom=false placeholder='Assign to'>
ejs-autocomplete>
div>


And I have subscribed to valueChanges and I want when I write some text that I get results. But I need press enter button to get info of server.

This is beside ngOnInit() method.
How I can get suggested name of server when I type into autocomplete controle insted of using pressing enter?
this.assetAssignmentForm.get('personId').valueChanges.subscribe(pid => {
this.filteredPersons = this.personService.get(`business/person?value=${pid}`);
this.filteredPersons.subscribe(console.log); --> When I press enter I got information to ConsoleLog

1 Reply

PO Prince Oliver Syncfusion Team November 2, 2018 04:07 AM UTC

Hi Marko, 

Thank you for contacting Syncfusion support. 

We have checked the reported issue in our end, but we were not able to reproduce it. We have prepared sample based your requirement for async pipe instead of data manager. Please find the sample for your reference.  
 
onChanges(): void { 
    this.skillForm.get('skillname').valueChanges.subscribe(pid => { 
        alert(pid); 
    }) 
} 
 
 
If you still have any issues, kindly modify the above sample to replicate the issue and share us the issue replication steps. It will help us provide solution at the earliest. 
 
Regards, 
Prince 


Loader.
Live Chat Icon For mobile
Up arrow icon