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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Observable instead of DataManager

Thread ID:

Created:

Updated:

Platform:

Replies:

140667 Oct 31,2018 01:13 PM UTC Nov 2,2018 04:07 AM UTC Angular - EJ 2 1
loading
Tags: AutoComplete
Marko
Asked On October 31, 2018 01:31 PM UTC

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

Prince Oliver [Syncfusion]
Replied On 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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;