Blazor component used multiple times on a page is showing search result data in both components

67 views Asked by At

I created an autocomplete component (input box with a search button). When the user types something in, a list appears below the input box with the results. This is all working fine, but when I use the component more than once on a given page, the results show up underneath both input boxes, not just the one I'm using. I believe this is because the search results themselves are being stored in a Fluxor store and when it changes blazor detects the change in that state variable and populates both lists. Is there a way to only show and update the list from the component the user is working with? Or do I need to create a list of results in my state store and pull out the appropriate one based on some key?

0

There are 0 answers