Carbon: Warning: Failed prop type: Dropdown: prop type `downshiftProps` is invalid

Created on 17 Jun 2019  路  3Comments  路  Source: carbon-design-system/carbon

What package(s) are you using?

  • [x] carbon-components-react

Detailed description

When using import { Dropdown } from 'carbon-components-react';

I receive the following warning:

Warning: Failed prop type: Dropdown: prop type `downshiftProps` is invalid; it must be a function, usually from the `prop-types` package, but received `object`.

Is this issue related to a specific component?

Dropdown

What did you expect to happen? What happened instead? What would you like to
see changed?

No warning

What browser are you working in?

Happens in any browser and the console (npm test)

What version of the Carbon Design System are you using?

[email protected]
[email protected]

Steps to reproduce the issue

<Dropdown
  ariaLabel="Dropdown"
  label="A Label"
  id="demo"
  items={[{ id: "1", label: "One" }, { id: "2", label: "Two" }]}
  onChange={() => {}}
  selectedItem="2"
/>

https://codesandbox.io/s/codesandbox-3t7v1

  • Check console
react bug 馃悰

All 3 comments

I am seeing the same error for ComboBox

Warning: Failed prop type: ComboBox: prop type `downshiftProps` is invalid; it must be a function, usually from the `prop-types` package, but received `object`

it affects all listbox components, since they are the only components depending on downshift

3109 resolved it for multiselect but I will be fixing it for combobox as well as dropdown

Was this page helpful?
0 / 5 - 0 ratings