How to use the react-instantsearch-dom.connectMenu function in react-instantsearch-dom

To help you get started, we’ve selected a few react-instantsearch-dom examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LessWrong2 / Lesswrong2 / packages / lesswrong / components / common / SearchBar.jsx View on Github external
import React, { Component } from 'react';
import { registerComponent, Components, getSetting } from 'meteor/vulcan:core';
import PropTypes from 'prop-types';
import { InstantSearch, SearchBox, connectMenu } from 'react-instantsearch-dom';
import { withStyles } from '@material-ui/core/styles';
import classNames from 'classnames';
import Icon from '@material-ui/core/Icon'
import Portal from '@material-ui/core/Portal';
import { addCallback, removeCallback } from 'meteor/vulcan:lib';
import { withLocation } from '../../lib/routeUtil';
import withErrorBoundary from '../common/withErrorBoundary';
import { algoliaIndexNames } from '../../lib/algoliaIndexNames.js';

const VirtualMenu = connectMenu(() => null);

const styles = theme => ({
  root: {
    display: 'flex',
    alignItems: 'center',
  },
  rootChild: {
    height: 'fit-content'
  },
  searchInputArea: {
    display: "block",
    position: "relative",
    minWidth: 48,
    height: 48,

    "& .ais-SearchBox": {
github TryGhost / docs / src / components / integrations / integration-search / IntegrationFilterMenu.js View on Github external
return (
            <>
                <a> {
                        e.preventDefault()
                        this.resetQuery()
                    }}
                &gt;All integrations</a>
                {items.map(this.renderItem)}
            
        )
    }
}

const IntegrationFilterMenu = connectMenu(IntegrationMenu)

export default IntegrationFilterMenu
github tylermcginnis / reacthooks.io / src / Search.js View on Github external
{items.map(item =&gt; (
          <option value="{item.value}">
            {item.label}
          </option>
      ))}
    
  )
}

const CustomMenuSelect = connectMenu(withRouter(MenuSelect));

function HookLink({ hit }) {
  const { name } = hit;

  return (
    <div>
      {name}
    </div>
  )
}

function Search() {
  return (
    <div>
      <div>
        </div></div>