We are having one query regarding the ejs AutoComplete functionality. We are having the data with duplicate key Item (ItemCode) having different Stock Quantity (StockQuantity).
while selecting the row with the particular combination, the first combination is getting autocomplete defiantly.
Below is the sample code.
Ex: Here when we select the fourth row with ItemCode(20060459) and 13 Stock quantity combination, the first row with ItemCode(20060459) and Stock Quantity(5) getting selected.
We cannot utilize the duplicate value property to keep component values; instead, we must use the text property to keep track of and permit only unique values to be set to the value property of autocomplete components. The text property can have repeated texts in the same situation; however, the value property can only have unique values to carry out its essential functions.
Hi Suresh Kumar,
I appreciate your update. I gave objects in the list array the "uniqId" field. When I turned on filtering for the autocomplete, the "value" property is being filtered instead of the "text" property, which is what I require.
Please let me know how I can apply filtering on the "text" property. CodesandBox attached below for reference.
Syncufsion v18 dropdown (forked) - CodeSandbox
Cyril, you can achieve your requirement by using the filtering event.
Find the code example here:
"Selected Item quantity",
args.preventDefaultAction = true;
let query = new Query();
query = query.where("ItemCode", "contains", args.text, true);
Find the modified sample here: https://codesandbox.io/s/syncufsion-v18-dropdown-forked-k4gj7n