after update values from backend - when ever open igx combo box values display empty.
Hi Riva,
Could you please clarify what do you refer to with “update values from backend”? yes, I assigned new set values . For my side I am assigned same name displayKey="field" only .
Hello,
Thank you for posting into our community!
I have been looking into your question and I need to ask for some additional information. Could you please clarify what do you refer to with “update values from backend”? Do you mean that you are binding the IgxCombo’s data property to a new set of data?
I am asking this question as in an effort to reproduce the described behavior, I have prepared a small sample where I am changing the combo data on button click, however, on my side, everything works as expected and the data is displayed successfully when opening the combo dropdown. This could be observed in the below attachment:
Additionally, since I am now sure how and when you are updating the data on your side, what I could assume is that the IgxCombo’s displayKey property is not set to the appropriate field in the data source. For example:
<igx-combo #combo [data]="data" displayKey="name" valueKey="id" ></igx-combo>
this.data = [ { id: 1, productName: "Ignite UI for Angular"}, { id: 2, productName: "Indigo Design"}, { id: 3, productName: "Ignite UI for jQuery"}, ];
The value used for displayKey is “name”, however, the field in the data source is “productName” and in such cases the values in the combo dropdown will be displayed as empty. Having this in mind, please verify if the correct field name is provided to the displayKey property.
Additionally, if the correct field is provided and the behavior is still reproducible, it would be extremely helpful if you could provide me with a sample that demonstrates the behavior on your side. Also, if it is possible, it would be great if you could try to modify the provided by me sample, so it reproduces the issue. Having a working sample, which I could debug on my side, will be highly appreciated and extremely helpful in providing you with a solution as soon as possible.
Here could be found my sample for your reference. Please test it on your side and let me know how it behaves.
Looking forward to your reply.
Sincerely,Riva IvanovaEntry Level Software Developer