How to use the prop-types-extra.deprecated function in prop-types-extra

To help you get started, we’ve selected a few prop-types-extra 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 ericgio / react-bootstrap-typeahead / src / containers / typeaheadContainer.js View on Github external
* Invoked when the input value changes. Receives the string value of the
     * input.
     */
    onInputChange: PropTypes.func,
    /**
     * Invoked when a key is pressed. Receives an event.
     */
    onKeyDown: PropTypes.func,
    /**
     * Invoked when the menu is hidden.
     */
    onMenuHide: deprecated(PropTypes.func, 'Use `onMenuToggle` instead'),
    /**
     * Invoked when the menu is shown.
     */
    onMenuShow: deprecated(PropTypes.func, 'Use `onMenuToggle` instead'),
    /**
     * Invoked when menu visibility changes.
     */
    onMenuToggle: PropTypes.func,
    /**
     * Invoked when the pagination menu item is clicked. Receives an event.
     */
    onPaginate: PropTypes.func,
    /**
     * Whether or not the menu should be displayed. `undefined` allows the
     * component to control visibility, while `true` and `false` show and hide
     * the menu, respectively.
     */
    open: PropTypes.bool,
    /**
     * Full set of options, including pre-selected options. Must either be an
github ericgio / react-bootstrap-typeahead / src / containers / typeaheadContainer.js View on Github external
* Invoked when the input is focused. Receives an event.
     */
    onFocus: PropTypes.func,
    /**
     * Invoked when the input value changes. Receives the string value of the
     * input.
     */
    onInputChange: PropTypes.func,
    /**
     * Invoked when a key is pressed. Receives an event.
     */
    onKeyDown: PropTypes.func,
    /**
     * Invoked when the menu is hidden.
     */
    onMenuHide: deprecated(PropTypes.func, 'Use `onMenuToggle` instead'),
    /**
     * Invoked when the menu is shown.
     */
    onMenuShow: deprecated(PropTypes.func, 'Use `onMenuToggle` instead'),
    /**
     * Invoked when menu visibility changes.
     */
    onMenuToggle: PropTypes.func,
    /**
     * Invoked when the pagination menu item is clicked. Receives an event.
     */
    onPaginate: PropTypes.func,
    /**
     * Whether or not the menu should be displayed. `undefined` allows the
     * component to control visibility, while `true` and `false` show and hide
     * the menu, respectively.
github ericgio / react-bootstrap-typeahead / src / containers / typeaheadContainer.js View on Github external
*
     * If a function is specified, it will be used to determine whether a custom
     * option should be included. The return value should be true or false.
     */
    allowNew: PropTypes.oneOfType([
      PropTypes.bool,
      PropTypes.func,
    ]),
    /**
     * Autofocus the input when the component initially mounts.
     */
    autoFocus: PropTypes.bool,
    /**
     * Whether to render the menu inline or attach to `document.body`.
     */
    bodyContainer: deprecated(PropTypes.bool, 'Use `positionFixed` instead'),
    /**
     * Whether or not filtering should be case-sensitive.
     */
    caseSensitive: checkPropType(PropTypes.bool, caseSensitiveType),
    /**
     * Displays a button to clear the input when there are selections.
     */
    clearButton: PropTypes.bool,
    /**
     * The initial value displayed in the text input.
     */
    defaultInputValue: checkPropType(PropTypes.string, defaultInputValueType),
    /**
     * Whether or not the menu is displayed upon initial render.
     */
    defaultOpen: PropTypes.bool,