github downshift-js/downshift v2.0.0

latest releases: v9.0.8, v9.0.7, v9.0.6...
6 years ago

2.0.0 (2018-06-14)

New Features

  • Improved TypeScript Definitions
  • New FlowTyped Definitions
  • Improved TS and Flow integration
  • Documentation re-organization to make it easier to identify the most common props.
  • A new prop getter called getMenuProps is recommended for accessibility purposes.
  • Simplified setting element IDs with new props: labelId, inputId, menuId, and getItemId which simplifies the internal implementation as well as resolving confusing accessibility issues. (These props are not required).

Bug Fixes

  • getButtonProps was renamed to getToggleButtonProps
  • A bunch of accessibility-related improvements and fixes
  • Downshift now works much better with menus rendered within a portal (given you use the new getMenuProps()).

Breaking Changes

  • Previously we supported render (<Downshift render={() => {}} />) and children (<Downshift>={() => {}}</Downshift>). Now we only support the children prop.
-<Downshift render={yourRenderFn} />
+<Downshift>{yourRenderFn}</Downshift>
  • The breakingChanges prop has been removed and the resetInputOnSelection option is now the default behavior. It only applies for use cases where the selectedItem is controlled. Learn more about this in #243.
  • If you're using CommonJS, you'll need to change your require statement:
-const Downshift = require('downshift')
+const Downshift = require('downshift').default
  • If you're using resetIdCounter, that's now exported separate from Downshift:
-import Downshift from 'downshift'
-Downshift.resetIdCounter()
+import Downshift, {resetIdCounter} from 'downshift'
+resetIdCounter()

Special thank you

All of the project contributors have been awesome. Thank you all. Here are a few specific people who helped in this release:

@kentcdodds, @stereobooster, @franklixuefei, @dovidweisz, @Antontelesh, @tansongyang, @Andarist, @cycomachead, @mperrotti, @SiTaggart, and @1Copenut

Don't miss a new downshift release

NewReleases is sending notifications on new releases.