Automated response Text Message is added to ObservableCollection - but does not show in UI.

Hi Support, 

I am wanting when you choose a Suggestion Item,  the Execute method of an ICOMMAND will call the following code: 

public void ResponseMessage()
        {
            this.Messages.Add(new TextMessage()
            {
                Author = new Author() { Avatar = "Aeroplane.png", Name = "Travel Bot" },
                Text = "Excellent Choice! Thank You",
            });
        }

Unfortunately the UI does not show the response message - however when i debug and view the ObservableCollection the Text message is added to the list.

Please advise?

regards

Adrian

3 Replies 1 reply marked as answer

PK Pradeep Kumar Balakrishnan Syncfusion Team February 4, 2021 09:51 AM UTC

Hi Andrean 
 
Thank you for contacting Syncfusion support. 
 
We have checked the reported query “Added message in SfChat suggestion selected command is not reflected in view” Unfortunately, we cannot be able to replicate the issue. We have attached the tested sample and video for your reference in the following link. 
 
Please share the complete code snippet of SfChat settings and it’s view model.to check and reproduce the issue from our side or can you please check the sample from your end and let us know the issue persist in the provided sample as well? If not kindly modify the sample based on your scenario and revert to us with the details. It will be helpful for us to check on it and provide you the solution. 
 
Regards, 
Pradeep Kumar B 


Marked as answer

AD Adrian De-Terville February 9, 2021 08:05 AM UTC

Hi Pradeep, 

Thank you so much for your sample - it works and explains where I was going wrong.  thank you for your speedy response.

Regards


PK Pradeep Kumar Balakrishnan Syncfusion Team February 9, 2021 08:35 AM UTC

Hi Andrean, 
 
We are glad that the given sample meets your requirement. Please get in touch with us if you would require any further assistance in future. 
 
Regards, 
Pradeep Kumar B 


Loader.
Up arrow icon