Hello,
thank you for answer. However, based on your code, I fixed the problem, but not how it should be. I found that in order to avoid duplicate data, it is necessary to return an empty field response to each request, except for the first one (the first data load into MultiSelect).
n your code, you compared whether the CustomerID contains something that came in the request to Where. But in Where request was "@field" = "OrderID" and Value was an order ID, not a customer ID. Thus, the response was always a empty array. That's why you did not succeed in replicating the problem. See screenshot bug1.png.
I've modified your code to compare the correct values and a duplication problem occurs again. See screenshot bug2.png and bug3.png. However, it was not a exactly same problem I originally reported.
My problem was that it always returned the same data - and I think the problem is that old data is not replaced by new ones, but they are added. When you turn off "Where filtering", you can see bug i reported (see screenshot bug4.png).
Repro:
//replace old Datasource method to:
public IActionResult Datasource([FromBody]DataManager dm)
{
var Data = OrdersDetails.GetAllRecords();
int count = Data.Count();
return dm.requiresCounts ? Json(new { result = Data, count = count }) : Json(Data);
}
-----
I attach zip with modified code and screenshots.
Thanks for help.
Attachment:
SF_Bug_b805a19a.zip