How to use the @elastic/search-ui.SearchDriver function in @elastic/search-ui

To help you get started, we’ve selected a few @elastic/search-ui 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 elastic / search-ui / packages / react-search-ui / src / SearchProvider.js View on Github external
componentDidMount() {
    const { config } = this.props;
    // This initialization is done inside of componentDidMount, because initializing the SearchDriver server side
    // will error out, since the driver depends on window. Placing the initialization inside of componentDidMount
    // assures that it won't attempt to initialize server side.
    const driver = new SearchDriver({
      ...config,
      a11yNotificationMessages: {
        ...defaultA11yMessages,
        ...config.a11yNotificationMessages
      }
    });
    this.setState({
      driver
    });
  }

@elastic/search-ui

A Headless Search UI library

Apache-2.0
Latest version published 2 months ago

Package Health Score

87 / 100
Full package analysis

Popular @elastic/search-ui functions

Similar packages