does anybody know how to trigger a refresh of the ...
# community-help
r
does anybody know how to trigger a refresh of the
react-instantsearch
? my use case is i'm adding documents dynamically via an upload & i want the component to show the latest. I know it isn't exactly a typesense issue but figured I'd ask here anyways
Copy code
const CustomHits = connectHits(Hits);
const SearchBox = connectSearchBox(Box);

export const Search = ({ onSelect = null }: { onSelect: any }) => {
  const { organization } = useActiveOrganization();

  return (
    <InstantSearch
      indexName="files"
      searchClient={typesenseInstantSearchAdapter.searchClient}
    >
      <Configure filters={`org_id:${organization?.id}`} />
      <div className="sticky top-0 bg-white">
        <SearchBox />
      </div>
      <CustomHits setClickedHit={onSelect} />
    </InstantSearch>
  );
};
I'm using the typesense adapter here.
j