score:0
i figured out how to do this using virtualwidgets.
https://community.algolia.com/react-instantsearch/connectors/connectmenu.html
the scope an index to a particular attribute i used the following method:
import { connectmenu } from 'react-instantsearch/connectors';
const virtualmenu = connectmenu(() => null);
// reset of component code
<instantsearch
appid="kjh78673iuh"
apikey="e55e048w7fh8wh8wrgh834c3ea51e3"
indexname="events"
/>
<configure hitsperpage={10} />
<virtualmenu attribute="site_id" defaultrefinement="1" />
<searchbox />
<h3>latest events</h3>
<hits />
<index indexname="venues">
<h3>latest venues</h3>
<hits />
</index>
<index indexname="users">
<h3>latest users</h3>
<hits />
</index>
</instantsearch>
you can also add the virtualwidget to the index
block itself too.
Source: stackoverflow.com
Related Query
- Algolia InstantSearch default Parameters / Scope
- Algolia show all the search parameters in instantsearch after render search results
- React functional component default props vs default parameters
- React Redux error: default parameters should be last default-param-last
- ES6 Object Destructuring Default Values for Nested Parameters
- How to migrate from defaultProps to Default Parameters
- bundle.js still contains arrow function and default parameters after using babel pollyfill
- React Algolia instantsearch connectSearchBox
- How to override the default state parameters in redux reducers?
- React Algolia InstantSearch - Is it possible to add a daterange?
- Transmit default function parameters with Babel
- How to pass parameters with a default value?
- How to pass parameters to custom event listener and prevent default in reactjs?
- Display Grid results with Algolia React Instantsearch
- Is there a way to set default parameters for multiple function without have to copy paste it
- Using both props.children and default Parameters
- Setting Default Parameters With Nested Array
- Algolia React default value and operation problem
- React functional component default parameters
- algolia instantsearch only show result that matches particular query (react)
- Algolia Instantsearch - show real html content in react app
- 'React' must be in scope when using JSX react/react-in-jsx-scope?
- How to set default Checked in checkbox ReactJS?
- Default property value in React component using TypeScript
- How to set component default props on React component
- How to set a default value in react-select
- Getting query parameters from react-router hash fragment
- Component does not remount when route parameters change
- How to specify (optional) default props with TypeScript for stateless, functional React components?
- react router v4 default page(not found page)
More Query from same tag
- React Hooks Getting data from inside an object state
- Access String array in Json
- Typescript input onchange event.target.value
- How to add missing dependencies to a useEffect hook that is run only once?
- In ReactJS How to save Child State in Parent state on destroying child?
- Can someone show me what's wrong with my Redux state?
- limit the number of suggestions AutoComplete component
- How do I add my 'AddToCart' button component in my navbar using react router?
- How to remove object from Array in ReactJS after click event
- Conditional Rendering in React js
- How to make just 1 row editable in material-table?
- How to debounce createAsyncThunk from Redux Toolkit
- React Application to have a staging environment and deploying with Docker on AWS Elastic BeanStalk
- Firebase authentication disappears on page refresh
- C# ASP:NET MVC back end - Change from React Router v4 HashRouter to BrowserRouter results in 404 on refresh
- How to fix React Apex Chart initial mount delay?
- How to test a stateless component
- Router does not work with Link (React Router Dom 6)
- How can I Initialize the state when using a stateless function to define my component
- React/JSX not taking my onClick handler whereas basic HTML does
- How to access current state on Redux Toolkit on createAsyncThunk
- React setState callback return value
- Cannot get lineHeight from dom element style using React
- Redux toolkit action is stuck in pending state even after api response is recieved
- How can React-Router-Dom v6 properly distribute internal routers among components?
- React: why set the document title inside useEffect?
- Is there a way to restrict params to certain values while using react-router?
- How to change active tab inkBarStyle color and thickness in React Material-UI?
- React-konva - Conneting Circle with a Line using mouse click
- React Router HashRouter inserting a ? before # in url