Sha256: eb4a1cb1ebfd6773e2b4a4769eb0b7ab874c9aa2671240e1862b36283a0e31fa

Contents?: true

Size: 1.18 KB

Versions: 29

Compression:

Stored size: 1.18 KB

Contents

import PropTypes from 'prop-types';

const commonSearchPropTypes = {
  userInputValue: PropTypes.string.isRequired,
  clearSearch: PropTypes.func.isRequired,
  getInputProps: PropTypes.func.isRequired,
  getItemProps: PropTypes.func.isRequired,
  isOpen: PropTypes.bool.isRequired,
  inputValue: PropTypes.string.isRequired,
  highlightedIndex: PropTypes.number.isRequired,
  selectedItem: PropTypes.string.isRequired,
  selectItem: PropTypes.func.isRequired,
  openMenu: PropTypes.func.isRequired,
  onSearch: PropTypes.func.isRequired,
  items: PropTypes.arrayOf(PropTypes.shape({
    text: PropTypes.string,
  })).isRequired,
  activeItems: PropTypes.arrayOf(PropTypes.string).isRequired,
  shouldShowItems: PropTypes.bool.isRequired,
};

export const commonInputPropTypes = {
  passedProps: PropTypes.shape({}).isRequired,
  onKeyPress: PropTypes.func.isRequired,
  onInputFocus: PropTypes.func.isRequired,
};

export const commonItemPropTypes = {
  items: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
  activeItems: PropTypes.arrayOf(PropTypes.string).isRequired,
  highlightedIndex: PropTypes.number.isRequired,
  getItemProps: PropTypes.func.isRequired,
};

export default commonSearchPropTypes;

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
katello-4.7.6 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.7.5 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.8.0.rc2 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.7.4 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.8.0.rc1 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.7.3 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.7.2 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.7.1 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.6.2.1 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.6.2 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.7.0 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.6.1 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.7.0.rc2 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.7.0.rc1 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.4.2.2 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.4.2.1 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.4.2 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.5.1 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.6.0 webpack/components/TypeAhead/helpers/commonPropTypes.js
katello-4.6.0.rc2 webpack/components/TypeAhead/helpers/commonPropTypes.js