Here is the thing, the user has to type like "engine" in the search box. Then, the repeater1 expands and shows results, let say two options. The user can select one option and show the details by repeater2. The problem is, the repeater2 shows the different details for different IDs. It supposes to be "Company A" for ID 42f31.. not the "Example". I not sure what I'm missing but it shows the row that comes first for the duplicate name instead of the filtered ID. Everything else works fine.
![](https://static.wixstatic.com/media/a27d24_ae63e537a0524b208ca005204fcb159e~mv2.png/v1/fill/w_108,h_54,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/a27d24_ae63e537a0524b208ca005204fcb159e~mv2.png)
![](https://static.wixstatic.com/media/a27d24_278bff5cb2c846b0beeafdc35bb8a9d8~mv2.png/v1/fill/w_82,h_38,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/a27d24_278bff5cb2c846b0beeafdc35bb8a9d8~mv2.png)
Here is my code by following another tutorial:
import wixData from 'wix-data'; export function searchBar_keyPress(event) { $w("#repeaterResults").data = []; $w("#repeaterResults").collapse(); setTimeout(() => { if ($w("#searchBar").value.length >= 2) { $w("#loadingGif").show(); $w("#datasetSearch").setFilter(wixData.filter().startsWith("associations", $w("#searchBar").value) .or(wixData.filter().startsWith("parts", $w("#searchBar").value)) ) .then(() => { count(); }) } else { $w("#repeaterSearch").collapse(); $w("#loadingGif").hide(); $w("#totalResultsText").hide(); } },500) } function count () { let total = $w("#repeaterSearch").data.length; if (total > 0) { $w("#repeaterSearch").expand(); $w("#totalResultsText").text = `${total} results found`; } else { $w("#repeaterSearch").collapse(); $w("#totalResultsText").text = "0 results found"; } $w("#totalResultsText").show(); $w("#loadingGif").hide(); } export function repeaterSearch_itemReady_1($item, itemData, index) { let id = itemData._id; $item("#parts").onClick(() => { $w("#loadingGif2").show(); $w("#repeaterResults").data = []; $w("#searchBar").value = $item("#parts").text; $w("#text62").text = id; $w("#datasetResults").setFilter(wixData.filter().eq("_id", id)) .then(() => { $w("#repeaterResults").expand(); $w("#repeaterSearch").collapse(); $w("#loadingGif2").hide(); }) $w("#repeaterSearch").data = []; $w("#loadingGif2").hide(); $w("#totalResultsText").hide(); }) }