Hold value and show text using FormControl

Hello,

I'm trying to setup ReactiveForms with your components. However, I'm facing some issues and I need your advice.

Prepared mini example to understand things better: 

Query: I want form control to always hold ID value and autocomplete always to show TEXT value. However, when I patch value to form control, autocomplete shows value which is the ID (instead of text). When I select value from autocomplete, then autocomplete shows text value but formControl hold also text value (instead of ID)

1 Reply 1 reply marked as answer

PM Ponmani Murugaiyan Syncfusion Team February 9, 2021 03:30 AM UTC

Hi Domantas,  
  
Greetings from Syncfusion support.  
  
Based on your shared information, our autocomplete components works based on value property. so, we suggest you update the component preselect value and patch value in the string value (“Game field value”). Because you have rendered the autocomplete component with string as value property.   
  
  
If you want to bind the Text and Value field mapping, then we suggest you our combobox component to achieve your requirement. to know more about our combobox component please refer the below documentation and demo links.  
  
  
  
Regards,  
Ponmani M 


Marked as answer
Loader.
Up arrow icon