Sha256: ecc24f97530247f9240c6db49dd179ec91f69c6844382d99198294c4e21a399f

Contents?: true

Size: 882 Bytes

Versions: 39

Compression:

Stored size: 882 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';
import SearchBar from 'foremanReact/components/SearchBar';
import { getControllerSearchProps } from 'foremanReact/constants';
import { hostsController, hostQuerySearchID } from '../../JobWizardConstants';

export const HostSearch = ({ value, setValue }) => {
  const props = getControllerSearchProps(hostsController, hostQuerySearchID);
  return (
    <div className="foreman-search-field">
      <SearchBar
        data={{
          ...props,
          autocomplete: {
            id: hostQuerySearchID,
            url: '/hosts/auto_complete_search',
            searchQuery: value,
          },
        }}
        onSearch={null}
        onSearchChange={search => setValue(search)}
      />
    </div>
  );
};

HostSearch.propTypes = {
  value: PropTypes.string.isRequired,
  setValue: PropTypes.func.isRequired,
};

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
foreman_remote_execution-14.1.2 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-14.1.1 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-14.1.0 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-14.0.2 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-14.0.1 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-13.2.6 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-14.0.0 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-13.2.5 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-13.2.4 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-13.2.3 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-13.2.2 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-12.0.7 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-13.2.1 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-13.2.0 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-10.1.3 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-13.0.0 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-12.0.5 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-12.0.4 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-12.0.1 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js
foreman_remote_execution-12.0.2 webpack/JobWizard/steps/HostsAndInputs/HostSearch.js