- #3446 Fix bug with select input value not being selectable. Thanks kangweichan.
- #3445 Fix accessibility bug. Disabled options are now focusable and announced by screen-readers but not selectable. Thanks sarahbethfederman.
- Fixed typo in style docs. Thanks thiagodebastos.
- #3460 Added description for actionTypes to docs. Thanks mikekellyio
- #3432 Fix bug with select menu's not working on mobile.
- #3427 remove focusOption() invocation on ENTER press if the menu is not open.
- #3402 fix menu scroll being reset on focus of a select with an open menu in ie11. See #3342 for details. Thanks timothypage
- #3420 fixed select menu being opened on click, when openMenuOnClick is false. Thanks caleb and rscotten
- #3419 fixed bug with ScrollCaptor operating on an undefined scrollTarget. Thanks iulian-radu-at
- #3411 fix bug where Enter key press on select with a closed menu wouldn't propagate up. Resolves #2217.
- #3407 remove unnecessary aria-roles from menu and options. This is now all handled by our aria-live implementation. Resolves #3355. Thanks sarahbethfederman.
- #3393, fix aria live announcement text for removing a selected option. Thanks msharkeyiii.
- #3350 Updated to 0.91 of flow. Updated types to pass stricter type checking, in later versions of flow. Thanks DragonWW
- #3370 Updated memoize-one dependency to 5.0.0. Thanks adam187
- #3366 Update build tooling, to leverage babel 7. Thanks DragonWW
- #3315 add RAF call to Collapse component getRef() such that getBoundingClientRect() is invoked consistently.
- #3275 wrap String invocation around inputValue to avoid calling toLowerCase on invalid elements. thanks tavareshenrique
- #3357, fix loadOptions call in Async select to always pass in a string for the inputValue.
- #3346 Revert work done in CSP nonce PR #3260 to unblock react-select usage in an SSR setting. Users who need nonce support still, please pin your version of react-select at 2.2.0. Nonce support will be re-added in 3.0.0 along with an upgrade to emotion 10; which includes nonce support without having to provide a custom emotion instance.
- #3296 Fix for tab interactions when in composition mode with an IME. Thanks yshr446 for the PR.
- #3302 Fix to breaking android and mobile safari touch bug #2755, by adding more conscientious checks to the onTouchStart and onTouchMove listeners. Thanks xakep139 for the PR.
- #3303 Input and GroupHeading components now get passed the selectProps prop, thanks maxmarchuk for the PR.
- #3260 As a result of the CSP nonce support feature, the emotion instance is now cached and passed down to all internal components, meaning that users looking to heavily customise their Select components can do so without externally importing emotion, and nonce instances are respected per select instance. Please see this segment in the docs for a more detailed explanation.
- #3299 fix to assistive text on menu open.
- [#3161] Initialize state with
inputValue
whendefaultOptions
is true in AsyncSelect, resolves #3160, thanks @cutterbl - [#3096] Placeholder component now also receives the isFocused state value as a prop. Thanks @Nelrohd
- [#3060] Fix bug where trying to set the cursor somewhere in an input value would close the menu. Thanks @stijndeschuymer
- [#3163] Fixed bug where isDisabled wasn't being reflected onto the DummyInput, which meant that disabled non searchable selects were still focusable. Thanks @gm0t
- [#3216] Fixes bug where clearing with backspace in a single select would result in an empty array, as opposed to the expected empty object. Thanks @IanVS
- [#3013] Fixes bug where the menu would close on trying to scroll using the scroll bar in IE11. Thanks @rakid
- A big shoutout to everyone who helped contribute to the docs. In no particular order @acrawford13, @kirillku, @ajaymathur, @mgalgs, @cutterbl, @JonathanWbn, @mwood23, @stevemao, @jossmac, and anyone else I've missed.
- Thanks to @IanVS for cleaning up our cypress tests.
- [#3132] Strip theme props from default Input and GroupHeading components, as they were polluting the DOM.
- [#3131] Add support for the 'Delete' key in the internal onKeyDown method. Same functionality as 'Backspace'.
- [#3100] Update flow-types and normalised default prop declarations in indicators. Thanks iseredov
- [#3083] Added sideEffects property to package.json to support tree-shaking in webpack 4.x. Thanks SimenB.
- [#3078] Update jest dependency to 23.6.0. Thanks papandreou
- [#3065] Update babel-plugin-emotion to 9.2.10. Thanks mtzhang
- [#3108] Update docs to include instructions for replicating the simple-value use case within react-select v2. Thanks elboletaire
- [#2839] Added support for theming via theme prop. Thanks akx
- [#2874] Fixed flow-types of MultiValue components. Thanks mike1808
- [#2903] Fix missing form input when there isn't a selected value. Thanks alvinsj
- [#2934] Reduced theme colors to a sane value set to make the exported theme more easy to consume and configure. Thanks jossmac
- [#2876] Added overflow hidden to valueContainer to stop overflowing text in the control. Thanks mike1808
- [#2975] Separated menu placement logic from menu primitive. Thanks jossmac.
- async select now accepts a filterOptions function as a prop #2822
- [BREAKING] react-select now exports react-select.esm.js from dist instead of react-select.es.js #2641
- [BREAKING] innerRef assignments in custom components must now be made from the root of the prop object, as opposed to reaching into innerProps. This is part of the work to normalize the behaviour circa custom components. #2824
- className and classNamePrefix deprecation warning and backward compatibility removed. className now only affects the select container, classNamePrefix prefixes all internal components. #2820
- Added
closeMenuOnScroll
prop, which can either be aboolean
or afunction
, if set totrue
the select menu will close on scroll of the document/body. If a function is supplied, it must take the following shape(event: ScrollEvent) => boolean
, the boolean value will be used to resolve whether the menu should be closed or stay open. #2809, thanks Vynlar for this. - Added fix to support IME inputs. #2767, thanks shamabe
- Removed primitives, and normalise multi-value components to be in line with existing component customisation patterns. #2821
- Normalised isOptionDisabled to be inline with its sibling prop isOptionSelected. #2821 Thanks SimeonC
- #2814 Added memoization to custom components within Select.js as well as in the exported makeAnimated factory method. Thanks to Alex Reardon's memoize-one
- #2652, Async Select now re-evaluates defaultOptions on componentWillReceiveProps. Thanks jesstelford
- Removed old aria-attributes in Option, MenuList and other components in favor of an aria-live-region implementation.
screenReaderStatus
prop is still at the moment untouched, andaria-labelledby
andaria-label
props are still available and retain their functionality. See #2581. - Internal ref
input
is nowinputRef
for consistency. - Internal ref
menuRef
is nowmenuListRef
for consistency. - Fixed bug with MultiValueRemove interaction not working in mobile #2762, thanks chuckbergeron.
- Added makeAnimated function export, that takes passed in components and wraps them in higher order components that expose animated functionality. #2724
- Added functionality to not render the menu if
noOptionsMessage
orloadingMessage
are set to null. #2754 - Fixed bug with mobile menu being blocked when
menuShouldBlockScroll
is true. #2756 - Enabled hideSelectedOptions functionality for single-select as well. Changed logic so that if isMulti is true and hideSelectedOptions is not defined, we will hide selected options by default. Explicitly setting hideSelectedOptions will override this behaviour. JedWatson#2753
- Updates to flow types, thanks mike1808, himerus, teamable-software and
- Bumped internal flow-bin dependency to 0.72.0, #2646 thanks lunij
- Fixed #2701, use of un-polyfilled array.includes() in Select.js, this has now been subbed out for a IE compatible implementation.
- #2733, fixed classname bug to do with prefixing classes with modifiers.
- #2723, fixed emotion compilation bug blocking loadingDot rendering.
- #2749 fixed typo in docs. thanks JuhQ
- #2717 added selected value to onChange to accommodate multi-select, thanks SimeonC
- Fixed bug with
css
attribute being wrongly applied to a DOM element in SingleValue. Thanks guigs - Added
removedValue
to theactionMeta
of theremove-value
action that's passed into theonChange
prop. - Reverted previous change of
innerRef
ininnerProps
of custom Components toref
. The property is now once again namedinnerRef
. This is mostly to resolve issues with styled-components not passingref
down to wrapped dom elements, however this is also a safer pattern to apply as it requires users providing their own custom components to explicitly associate the passed down ref with the requisite dom element. - selectValue now filters items based on the getOptionValue method. Thanks (inv8der)[http://github.com/inv8der]
- Added
createOptionPosition
to creatable select to allow users to specify where the createOption element appears in the menu. - Added touch handling logic to detect user intent to scroll the page when interacting with the select control.
- Added
controlShouldRenderValue
prop, defaults to true. Setting it to false disables rendering values in the control. ThanksJoss Mackison
- Fixed bug where transition props were being spread onto the DummyInput causing react warnings in the console. Thanks Mike Gardner
Note: There is an important change in this release to the behaviour of className
.
Previously, className
would control the class names applied to internal components
as well as the containing element. Now, the className
prop only controls the class
name of the containing element, and the new prop classNamePrefix
controls classes
applies to internal components.
Until 2.0.0 final is released, we have added backwards compatibility and a deprecation warning to cover this change.
- Added
classNamePrefix
prop, which now controls the class names applied to internal components - Refactored cx internal implementation to reduce specificity of css-in-jss base styles.
maxValueHeight
prop removed- Added
--is-disabled
className modifier to Option component, thanks eemeli - Fixed various IE11 issues, see #2583
- Added multi-value keyboard navigation using left and right arrows.
- Simplified flow distribution, thanks falconmick
- Added fix to ensure focus is on the Input when the menu opens
- Switched from glam to emotion for css-in-js
- Input colour can now be changed
- Use of React 16 Fragment removed, 2.0.0 should work with React 15
- SSR support improved
- Indicator icons are now exported
- Added
tabIndex
prop - Added
classNames
prop - Added upgrade guide from v1 --> v2
- Fixed bug with overflowing long values in the control
- Fixed ie11 bug to do with absolutely positioned children in flex parent.
- Documentation ie11, styling and copy improvements
Minor fix since last alpha:
- Fixed a flow type issue that was causing issues for consumers
Minor fix since last alpha:
- Fixed an issue with
dist/react-select.es.js
wherebabelHelpers
weren't defined
Ongoing rewrite. Major changes since last alpha:
- Added
openMenuOnClick
andopenMenuOnFocus
props - Significant test coverage and documentation improvements
- Added
onMenuScrollToTop
andonMenuScrollToBottom
event props scrollMenuIntoView
prop renamedmenuShouldScrollIntoView
onKeyDown
now based on event.key not event.keyCode- Component ids no longer have double separators
- Fixed a Firefox bug with
position: absolute
anddisplay: flex
- Added support for fixed position menu and scroll blocking
- Fixed issue with transition group props being passed to child components
- Fixed issue with portalled menu display when
menuPlacement="top"
Ongoing rewrite. Major changes since last alpha:
- Made
focus
andblur
methods work consistently when composing HOCs - Added
menuPortalTarget
prop which portals the menu, with aMenuPortal
component andmenuPortal
style key - Allow the
MultiValueRemove
component children to be changed - Lots of new tests, updates to documentation and examples
Ongoing rewrite. Major changes since last alpha:
- Significantly improved touch and mobile support
- New positioning behaviour for the Menu
- Added
scrollMenuIntoView
prop, which does exactly what you'd expect - Added action meta to the
onInputChange
event handler arguments Creatable
Component AddedAsyncCreatable
Component Added- Fixed an issue with the layout that would trigger a Firefox repaint bug
- Improved behaviour when the
isDisabled
prop value is changed - The
IndicatorSeparator
isn't rendered when there is noDropdownIndicator
- Converted
StateManager
to a higher order component - New website, docs, and more tests! (still WIP)
- Examples can now be launched in CodeSandbox, thanks to Ben Conolly
Ongoing rewrite. Major changes since last alpha:
menuIsOpen
,inputValue
andvalue
are now controllable props that default to internal state- Fixed missing loading indicator
- Added "open in code sandbox" to all examples
- Switched menu rendering from li to div tags for better screen reader usability
- Removed unused primitives and simplified indicator components
- Improved accessibility of groups and options, cleaned up Group implementation
- Fixed some input alignment issues
- Added right-to-left support with
isRtl
prop - Support blocking page scroll at menu boundaries with
captureMenuScroll
prop - Added automatic menu flipping at window boundaries with
menuPlacement
andmenuShouldFlip
props - Added
isSearchable
prop to support simple (not searchable) select inputs - Added
pageSize
prop
Ongoing rewrite. Major changes since last alpha:
- Fixed an issue where animated values would show ellipsis while leaving
- Long single values are now also correctly truncated
Ongoing rewrite. Major changes since last alpha:
- Added support for Promises in the Async component
- Added
setValue
method on the Select class - More consistent use of
innerProps
for internal components - Internal components are now provided a consistent set of props and API
- Improved handling of keyboard and mouse interaction for options in the menu
- Default filtering behaviour now has parity with v1
- New
createFilter
method lets you customise the filter options - Some unnecessary components have been removed for better performance
- Long values are now truncated
Ongoing rewrite. Major changes since last alpha:
- Added
getOptionValue
,getOptionLabel
andformatOptionLabel
props - Added
isOptionSelected
andisOptionDisabled
props - Added
name
anddelimiter
props to support hidden html inputs for forms - Added
loadingMessage
,noOptionsMessage
andscreenReaderStatus
props so messages can be customised - Customisable components are now passed
innerProps
for simpler implementation - Cleaned up internal Components and made sure they can all be styled
- Implemented customisable filtering function with support for case and diacritics
- Fixed various css bugs and vendor prefixing issues
- Accessibility improvements
Ongoing rewrite. Major changes since last alpha:
Async
component addedstyles
prop added to Select componentisLoading
prop to Select component and new indicator added- Support added for disabled options
- Internal components cleaned up
- Cypress tests added
- CSS class names added to default components
- Accessibility improvements
Complete rewrite, docs and upgrade notes on changes from v1 to come later.
- Fixed blocking the Del key when deleteRemoves is false, thanks Nachtigall, Jens (init) - see PR
- Fixed inline-block rendering for arrowRenderer without autosize, thanks Harry Kao - see PR
- Fixed dropdown menu positioning issues in IE 11, thanks jharris4 - see PR
- Added missing rule to the
scss
stylesheet, thanks Jordan Whitfield - see PR
master
- Source cleanup, thanks to Yuri S and Charles Lee - see PR
- Switched from babel-preset-es2015 to babel-preset-env, thanks Rambabu Yadlapalli - see PR
- Fixed focused option. Issue #2237, thanks Yuri S - see PR
- Fix onSelectResetsInput bug from keyboard navigation, thanks Charles Lee - see PR
- Fixed all warnings on running tests, thanks Yuri S - see PR
- Added missing tests for Option.js and refactored Option-test.js., thanks Yuri S - see PR
- Added missing tests for Async.js, thanks Yuri S - see PR
- Fixed console error in GitHub users example, thanks Yuri S - see PR
- Fixed readme example. Issue #2235, thanks Yuri S - see PR
- Regression fix for single select with onSelectResetsInput=false, thanks Yuri S - see PR
- Pass placeholder prop to ValueComponent, thanks Aravind Srivatsan - see PR
- Refactored handleKeyDown switch, thanks Yuri S - see PR
- onSelectResetsInput regression fixed, thanks Jed Watson - see PR
- Don't open drop down menu when clear values, thanks Jed Watson - see PR
- Clear input value on receiving props with another value., thanks Yuri S - see PR
- Fix/is option unique crash, thanks Jacob Zuo - see PR
- Use react-input-autosize v2.1.2 for guard against undefined window, thanks DStyleZ - see PR
- Fix issue #2182, thanks Kurt Hoyt - see PR
- Documenting behavior of onBlurResetsInput in the readme., thanks hobbsl - see PR
- Use onSelectResetsInput for single select, thanks lachiet - see PR
- Fix state value in README example, thanks Srishan Bhattarai - see PR
- document breaking change of removing getInputValue, thanks Turadg Aleahmad - see PR
- Fixed search for invalid label and/or value, thanks Yuri S - see PR
- added; more props are passed to the Option component:
focusOption
,inputValue
,selectValue
,removeValue
- added; the
inputValue
is passed as the third argument to theoptionRenderer
- fixed; issues opening the menu correctly for multiselect when
autosize={false}
- fixed; removed
event.stopPropagation()
from Select'sclearValue
andonClick
handlers, thanks Thomas Burke - fixed;
handleMouseDownOnArrow
whenopenOnClick={false}
, thanks elias ghali - fixed; conditional scrolling into view of focused option, thanks Michael Lewis
- reintroduced source files for scss and less stylesheets into the npm package
- breaking; removed
getInputValue
function - see PR - reverted spacebar-selects-option behaviour for searchable selects, thanks Charles Lee - see PR
- fixed behaviour where async doesn't handle onInputChange returning a value, thanks Anton - see PR
- fixed Creatable bug where the first enter keypress is ignored when
promptTextCreator
returns only the label, thanks George Karagkiaouris - see PR - Utility functions are now exported from the es6 build, thanks Deiru - see PR
- Update aria-only class to have absolute positioning, thanks Jacob Hilker - see PR
- gives possibility to use ref property for Creatable, thanks blacktemplar - see PR
- Adds lint and test pre-commit hooks, thanks carymcpoland - see PR
- Disable some browser-specific behaviours that break the input, thanks Jed Watson - see PR
- onOpen: run after dom has rendered, thanks Karl-Aksel Puulmann - see PR
- fix not clearing when given invalid values, from #1756, thanks [Mário][https://github.com/ticklemynausea] - see PR
- Exports Option Component, thanks Erkelens, Jan Paul - see PR
- Fix/numeric multi select, thanks Charles Lee - see PR
- removeSelected prop (round 2), for optionally keeping selected values in dropdown, thanks Jed Watson - see PR
- pass removeValue() and always pass valueArray, thanks kcliu - see PR
- Accessibility Enhancements - Aria tags, Space/Enter keys, thanks sushmabadam - see PR
- added rtl support, thanks Dekel - see PR
- Add inputValue to menuRenderer, thanks headcanon - see PR
- fix typo in handleKeyDown method, thanks jasonchangxo - see PR
- Fix/numeric multi select, thanks Charles Lee - see PR
- expose children in AsyncCreatable.js, thanks Charles Lee - see PR
- replace trim fn loop with regex, thanks Charles Lee - see PR
- Trim search text from beginning and the end. (fixes #1861), thanks Serkan Ozer - see PR
- Add variable for focused input background, thanks Aron Strandberg - see PR
- Added id in the input select, thanks thecreazy - see PR
- adding a nvmrc file and adding coverage to eslintignore, thanks Dave Birch - see PR
- Updated the comment for the deleteRemoves option., thanks Abul Dider - see PR
- implemented optional rendering of arrow, thanks rolandjohann - see PR
- Skip rendering arrow wrapper when custom arrow renderer returns falsy value, thanks Mike Lewis - see PR
- do not show clear button if value is an empty string, thanks Marie Godon - see PR
- Set isLoading to false if cache hit, thanks timhwang21 - see PR
- Add aria-labels to Options, thanks jasonchangxo - see PR
- Adds source links to each example, thanks Damon Bauer - see PR
- Issue #2056: onInputChange should return modified value, thanks Caleb Scholze - see PR
- Remove option
addLabelText
from README and propTypes, thanks Jannes Jeising - see PR - GitHub has a capital H, thanks David Baumgold - see PR
- refactor componentWillUnmount(), thanks riophae - see PR
- Slim down NPM package, thanks Valentin Agachi - see PR
- Update contributing doc, thanks Gregg Brewster - see PR
- strip proptypes in production build (fixes #1882), thanks Jochen Berger - see PR
- Support Webpack 2, Webpack 3, rollup., thanks Matthew Schnee - see PR
- Add missing semicolon, thanks jochenberger - see PR
- autofocus --> autoFocus, thanks Charles Lee - see PR
- Async> cache async response regardless of req order, thanks Timothy Hwang - see PR
- Make this work in preact., thanks liaoxuezhi - see PR
- Correct release candidate version on README, thanks Damon Aw - see PR
- Fix test name, thanks jochenberger - see PR
- Fixing css states to be scoped with Select selector, closes #1951., thanks Adam Girton - see PR
- fix typo, thanks jochenberger - see PR
- changed;
openAfterFocus
prop has been renamed toopenOnClick
, and now defaults totrue
- fixed; React.PropTypes deprecation warning, thanks Jeremy Liberman
- improved; scrolling behaviour when navigating the menu with the keyboard, thanks boatkorachal
- fixed; error with the
Async
cache when you type"hasOwnProperty"
, thanks SuhushinAS
- fixed; clearable padding style, thanks Minori Miyauchi
- fixed; removed use of
Object.assign
, fixes IE compatibility - added; new
closeOnSelect
prop (defaults totrue
) that controls whether the menu is closed when an option is selected, thanks to Michael Elgar for the original idea - changed; by default, the menu for multi-selects now closes when an option is selected
- changed;
Async
component no longer always clears options when one is selected (although the menu is now closed by default). UsecloseOnSelect={false} onSelectResetsInput={false}
to leave the menu open. - fixed;
Async
component always calledonChange
even when it wasn't provided - fixed; input lag for the
Async
component when results are returned from cache - fixed; required was not being updated without an onChange handler
- fixed; peer dependencies for
prop-types
, thanks Michaël De Boey - fixed; internal optimisations, thanks Kieran Boyle
- added;
Value
component is now exported, thanks Prof Gra - fixed; callback fired after
Async
component unmounts, thanks Andrew Russell - fixed; wrapping on Firefox in SCSS files, thanks Michael Williamson
- fixed;
onMenuScrollToBottom
does not work in chrome 58.0, thanks Simon Hartcher - fixed; missing es6 module build for
js:next
entrypoint - updated;
react-input-autosize@2.0.0
including several fixes for react-select (see changes)
- fixed; issue with
lib
build preventing use in ES2015 environments
- fixed; changing
required
prop fromtrue
tofalse
now works as expected, thanks George Karagkiaouris - added; new prop
onSelectResetsInput
controls whether the input value is cleared when options are selected, thanks David Roeca and Alexander Nosov - fixed; tabindex parent bug fix for Edge, thanks George Payne
- fixed; update selectize link in README.md, thanks kerumen
- added; standard issue template, thanks agirton
- added; new build process using rollup and webpack. Removed grunt. thanks gwyneplaine
- fixed; updated contributor docs with the correct node version reference gwyneplaine
- fixed; missing method binds in Option, thanks agirton
- fixed; converted components to use es6 classes, thanks jochenberger
- fixed; console.log example in usage docs, thanks rohmanhm
- fixed; hide create option after closing menu, thanks andreme
- fixed; remove circular reference, thanks agirton
- fixed; readme typo, thanks ieldanr
- fixed; add missing function binds in Option component, thanks agirton and blacktemplar
- fixed; re-added fix to #1580, thanks agirton
- fixed; avoid mutating user inputs when ignoring case/accents, thanks not-an-aardvark
- fixed; issues synchronising options props in
Async
, thanks cbergmiller - fixed; backspace handling for non-multi select controls, thanks Jeremy Liberman
- fixed; Allow
falsey
values to be clearable, thanks Simon Gaestel - fixed; issue where Firefox would crash due to incorrect use of
aria-owns
attribute, thanks Max Hubenthal - fixed; regression where options not using the value key couldn't be focused, thanks Benjamin Piouffle
- fixed; no more warning when using React 15.5, thanks Adam Girton
- fixed; issue comparing objects in
getFocusableOptionIndex
, thanks rndm2 - fixed; missing .focus() method in
Creatable
, thanks Anton Alexandrenok - added; support for
aria-describedby
attribute, thanks Eric Lee - added;
.is-clearable
className when clearable is true, thanks Dan Diaz
- added;
arrowRenderer
prop, thanks Brian Vaughn - added; child-function support to
Async
andCreatable
components so that they can compose each other (or future HOCs), thanks Brian Vaughn - added;
asyncCreatable
HOC that combinesAsync
andCreatable
so they can be used together, thanks Brian Vaughn - added; undocumented arguments for
menuRenderer
, thanks Julian Krispel-Samsel - fixed; Do not focus and open menu when disabled, thanks nhducit
- fixed; Scrolling with arrow-keys is not working correctly, thanks Damian Pieczynski
- added; "select all text" functionality
Shift+Home|Del
, thanks Damian Pieczynski - added; support for
boolean
values, thanks Aaron Hardy - fixed; Remove duplicated
promptTextCreator
field from readme, thanks Jih-Chi Lee - fixed; Adding back ref that was removed in rc2, thanks Martin Jujou
- fixed;
Creatable
component doesn't allow input key down handling, thanks Ivan Leonenko - added; Allow react nodes to be passed as loadingPlaceholder, thanks Daniel Heath
- fixed; IE8 compatibility issues, thanks Kirill Mesnyankin
- improved; Allow users to specify noResultsText, thanks Daniel Heath
- added; Only remove options if a loading placeholder is available, thanks Daniel Heath
- fixed; firefox display items in two rows due to reflow, thanks Daniel Heath
- fixed;
Creatable
readme typo, thanks Ben - fixed; explain way to implement
allowCreate
functionality withCreatable
to readme, thanks mayerwin - added; delete key removes an item when there is no input, thanks forum-is
- added;
onNewOptionClick
handler forCreatable
, thanks Lee Siong Chan - fixed;
onInputChange
consistent forCreatable
, thanks Lee Siong Chan - fixed;
menuRenderer
is treated consistently betweenCreatable
andSelect
, thanks Brian Vaughn - fixed;
asyncCreatable
options parsing will not parse undefined values into props, thanks Romain Dardour - added; pass
inputProps
toinputRenderer
, thanks Alec Winograd - fixed; no exception when clearing an Async field that is not set to multi, thanks Patrik Stutz
- added; allow rendering a custom clear component, thanks Conor Hastings
- fixed; document
ignoreAccents
, thanks Domenico Matteo - fixed; arrowing up or down in
Select
with 0 options does not throw type error, thanks Alex Howard - fixed;
Creatable
handles null children prop, thanks Jack Coulter - added; provide
isOpen
to arrowRenderer, thanks Kuan - fixed; re-added the
focus()
method onSelect.Async
, thanks, Maarten Claes - fixed; focus the next available option after a selection, not the top option, thanks Nicolas Raynaud
Note there has also been a breaking change to the props for the Async
component: both minimumInput
and searchingText
have been removed. See #1226
for more details. Apologies for doing this in an RC release, but we had to trade
off between resolving some important bugs and breaking the API, and figured it
was better to do this before declaring 1.0.0 stable.
- fixed; reset value to
[]
whenmulti=true
, thanks Michael Williamson - added; pass index to
renderLabel
method, thanks nhducit - fixed; uncontrolled to controlled component warning in React 15.3
- fixed; props cleanup, thanks Forbes Lindesay
- fixed; issue where a value of the number
0
would be assumed to be no value, thanks Hanwen Cheng - fixed; internal refs converted to callbacks instead of strings, thanks Johnny Nguyen
- added; optional
instanceId
prop for server-side rendering, thanks Jevin Anderson - added;
onCloseResetsInput
prop, thanks Frankie - added;
Creatable
component, replaces pre-1.0allowCreate
prop, thanks Brian Vaughn
- fixed;
react-input-autosize
has been udpated to1.1.0
, which includes fixes for the new warnings that React 15.2 logs - fixed; "Unknown prop
inputClassName
ontag" warning, thanks Max Stoiber - fixed; Removed unnecessary
onUnfocus
, thanks Johnny Nguyen - added; Support for react components in
searchPromptText
, thanks Matt - fixed; focus bug on iOS, thanks Tony deCatanzaro
- fixed; Async bugs with Promises, thanks Vladimir and Ian Firkin
- fixed;
searchingText
bug, thanks Tony deCatanzaro - improved; More antive-like input behaviour, thanks Johnny Nguyen
- fixed; Added missing unit (px) to
minWidth
attribute, thanks Ian Witherow - added; Support for assistive technologies, thanks Dave Brotherstone
- fixed; React error if
onChange
callback causes a root component to unmount, thanks Nathan Norton - fixed; Open menu is now closed if
disabled
becomes true, thanks Jason Moon - fixed; Prevent
getFocusableOptionIndex
from returning a disabled option, thanks Brian Powers - added; Home, End, Page Up/Down support, thanks Jason Kadrmas
- fixed; Don't render
backspaceToRemoveMessage
ifbackspaceRemoves
is set to false, thanks Ryan Zec - fixed; Issue with an outline appearing on the auto sized input, thanks Ryan Zec
- fixed; Events don't propagate when
esc
is pressed, thanks Yoshihide Jimbo - fixed; Update
required
prop based on nextProps on update, thanks Matt Shwery - fixed; On focus check whether input ref is a real input or an input component, thanks Peter Brant and Greg Poole
Also a big thanks to Brian Vaughn for his help triaging issues for this release!
- added;
inputRenderer
prop, allows you to override the input component, thanks Sean Burke - added;
openOnFocus
prop, causes the menu to always open when the select control is focused, thanks HuysentruytRuben - added;
react-virtualised-select
HOC example, thanks Brian Vaughn - added;
tabSelectsValue
prop can be set to false to prevent selection of focused option when tab is pressed, thanks Byron Anderson - added; ability to override
resetValue
when clearing the control, thanks Alexander Luberg - added; input can be updated with
onInputChange
, thanks Brett DeWoody - added; Styles for .is-selected class, thanks Danny Herran
- fixed;
noResultsText
prop type is nowstringOrNode
for Async component, thanks Michael Groeneman - fixed;
onInputChange
is wrapped by Async component, thanks Eric O'Connell - fixed;
scrollMenuIntoView
behaviour in IE10, thanks Ivan Jager - fixed; isEqualNode replaced with strict equality check, thanks Alexandre Balhier
- fixed; issue with value object not being passed to
handleRequired
, thanks Andrew Hite - fixed; the menu-outer container is no longer rendered when it does not contain anything, thanks Kuan
- improved; better support for IE8 in styles, thanks Rockallite Wulf
- added;
menuRenderer
method and example for effeciently rendering thousands of options, thanks Brian Vaughn - added;
optionClassName
prop, thanks Max Tyler
- updated dependencies to allow use with React 15.x
- changed; multiple selected values are now submitted using multiple inputs, thanks Trinh Hoang Nhu
- added;
joinValues
prop to revert the above change and submit multiple values in a single field with the delimiter
- fixed build issues with v1.0.0-beta9
- added; onBlurResetsInput prop, thanks Sly Bridges
- changed; Enter selects and retains focus, Tab selects and shifts focus, thanks RDX
- fixed; Hide noResultsText when value is falsy, thanks Fernando Alex Helwanger
- added;
required
prop, adds HTML5 required attribute, thanks Domenico Matteo - fixed; Touch drag behaviour, thanks Pavel Tarnopolsky
- added;
onOpen
andonClose
event props, thanks Jacob Page - fixed; Pressing Enter on open Select should stop propagation, thanks Jeremy Liberman
- fixed; Missing handleMouseDownOnMenu, thanks Jeremy Liberman
- added; Ensures the selected option is immediately visible when the menu is open, thanks Martin Jujou
- added;
autoBlur
prop, blurs the input when a value is selected, thanks Pavel Tarnopolsky - fixed; Several isFocused checks weren't working properly
- fixed; input focus bug when toggling
disabled
prop, thanks Davide Curletti - fixed;
focus()
is now exposed on theAsync
component, thanks AugustinLF
- You can now use React elements for placeholders and the text props, thanks kromit and Alyssa Biasi
- Fixed a problem where the border doesn't show when the element is inside a table, thanks Rodrigo Boratto
- New prop
scrollMenuIntoView
scrolls the viewport to display the menu, thanks Alexander Zaharakis - New LESS / SCSS variable
select-option-bg
lets you control the menu option background color, thanks Evan Goldenberg - Fixed an error in the blur handler on IE when the menu is not visible, thanks Gaston Sanchez
- Added support for a
clearableValue
option property inmulti
mode, thanks Sly Bridges
- Test suite complete and passing, with a couple of minor fixes thanks to @bruderstein
- Fixes issues relating to serializing simple values into the hidden field
- New default styles that match Elemental UI and look right at home in the new KeystoneJS Admin UI
We're potentially going to ship some theme stylesheets in the future, shout out on GitHub if this interests you.
- The selected value populated in the hidden field has been fixed (was
"[object Object]"
before) - Added new
autofocus
prop - Fixed duplicate key error for options and values with duplicate
value
properties - SCSS variables now have
!default
so you can override them
Changed since beta 1:
- Async options cache works again
- New style props for custom styling the component without modifying css
classes:
style
wrapperStyle
menuStyle
menuContainerStyle
- The menu opens and closes correctly when
searchable={false}
, there is still some work to do on this use-case
This is a complete rewrite. Major changes include:
- Everything is simpler (I'm nearly done and the source code is only 60% of the size of the last version)
- No more timeouts or weird handlers, the restructuring has let me make everything more straight-forward
- The options array is no longer preprocessed into state, just retrieved from props
- The values array is now initialised in the Options array during render, and not stored in state, which along with the change to options makes the component more reliable and fixes issues with props not updating correctly
- The component no longer stores its own value in state (ever) - it needs to be
passed as a prop and handled with
onChange
. - Complex values are now enabled by default (so you're passed the option object, not its value); you can enable the legacy mode with a prop
- The Value and Option components have been cleaned up as well for consistency
- The hidden
<input>
field is now optional and the component is better suited to use in a rich React.js app than it was - You can disable options filtering to do the filtering externally with
onInputChange
- Accents on characters can now be ignored
- The
asyncOptions
prop has been replaced by a new wrapper component:Select.Async
Note that "Tag mode" (creating options on the fly) isn't reimplemented yet.
A full guide to the breaking changes and new features will be written up soon. In the meantime please see the new examples.
- added; new Contributors example w/ async options loading and custom value / label keys
- fixed; several issues with custom
valueKey
andlabelKey
props - fixed; autoload now loads options with no search input
- added; SCSS stylesheets!
- improved; Options rendering should be more performant
- breaking change; Custom
Option
components now need to pass theiroption
prop to event handlers; see this commit for an example of the required change.
- fixed; LESS math operations now work with --strict-math=on, thanks Vincent Fretin
- fixed; IE issue where clicking the scrollbar would close the menu, thanks Pete Nykänen
- added; Promise support for
loadAsyncOptions
, thanks Domenico Matteo
- fixed;
loadAsyncOptions
raises TypeError in setup, see #439 for details, thanks Pancham Mehrunkar
This release contains significant DOM structure and CSS improvements by @jossmac, including:
- no more
position: absolute
for inner controls display: table
is used for layout, which works in IE8 and above, and all other modern browsers- less "magic numbers" used for layout, should fix various browser-specific alignment issues
- clear "x" control now animates in
- clearer
.Select--multi
className replaces.Select.is-multi
- new height & theme variables
- "dropdown" indicator chevron is no longer displayed for multi-select controls
There are no functional changes, but if you've forked the LESS / CSS to create your own theme you'll want to pay close attention to PR #527 when upgrading to this version.
React Select is updated for React 0.14. If you're still using React 0.13, please
continue to use react-select@0.6.x
. There are no functional differences
between v0.7.0 and v0.6.12.
Additionally, our tests now require Node.js 4.x. If you are developing
react-select
, please make sure you are running the latest version of node.
Thanks to @bruderstein, @dmatteo and @hull for their help getting these updates shipped!
- added;
labelKey
andvalueKey
props, so you can now use different keys inoption
objects for the label and value - fixed; additional
isMounted()
checks in timeouts - fixed; componentDidUpdate timeout is reset correctly, see #208 and #434, thanks Petr Gladkikh
- fixed; mousedown event on scrollbar in menu no longer hides it, thanks Yishai Burt
- added;
isLoading
prop, allows indication of async options loading in situations where more control is required, thanks Jon Gautsch
- fixed; a build issue with the previous release that prevented the stylesheet being generated / included
- fixed; a LESS syntax issue, thanks Bob Cardenas
- added;
style
key for package.json, thanks Stephen Wan - added;
onInputChange
handler that returns the current input value, thanks Tom Leslie - fixed; simplifying handleKey function & preventDefault behaviour, thanks davidpene
- fixed; Display spinner while auto-loading initial data, thanks Ben Jenkinson
- fixed; better support for touch events, thanks Montlouis-Calixte Stéphane
- fixed; prevent value splitting on non-multi-value select, thanks Alan R. Soares
- fixed; broader range of allowed prereleases for React 0.14, including rc1
- fixed; preventing backspace from navigating back in the browser history, thanks davidpene
- fixed; missing styles for
.Select-search-prompt
and.Select-searching
issues, thanks Jaak Erisalu and davidpene
- fixed; issue in Chrome where clicking the scrollbar would close the menu, thanks Vladimir Matsola
- fixed; completely ignores clicks on disabled items, unless the target of the click is a link, thanks Ben Stahl
This release includes a huge improvement to the examples / website thanks to @jossmac. Also:
- added; support for React 0.14 beta3
- fixed; disabled options after searching, thanks @bruderstein
- added; support for "Searching..." text (w/ prop) while loading async results, thanks @bruderstein and @johnomalley
- added;
className
,style
andtitle
keys are now supported in option properties, thanks @bruderstein
Otherwise known as "the real 0.6.2" this includes the updated build for the last version; sorry about that!
- changed; if the
searchable
prop isfalse
, the menu is opened or closed on click, more like a standard Select input. thanks MaaikeB
- added; Support for options with numeric values, thanks Dave Brotherstone
- changed; Disabled options now appear in the search results , thanks Dave Brotherstone
- fixed; asyncOptions are reloaded on componentWillReceiveProps when the value has changed, thanks Francis Cote
- added;
cacheAsyncResults
prop (defaulttrue
) now controls whether the internal cache is used forasyncOptions
- improved; option, value and single value have been split out into their own components, and can be customised with props. see #328 for more details.
- improved; Near-complete test coverage thanks to the awesome work of Dave Brotherstone
- improved; Support all alpha/beta/rc's of React 0.14.0, thanks Sébastien Lorber
- fixed; Close multi-select menu when tabbing away, thanks Ben Alpert
- fixed; Bug where Select shows the value instead of the label (reapplying fix)
- fixed;
valueRenderer
now works whenmulti={false}
, thanks Chris Portela - added; New property
backspaceRemoves
(defaulttrue
), allows the default behaviour of removing values with backspace whenmulti={true}
, thanks Leo Lehikoinen
- fixed; Allow entering of commas when allowCreate is on but multi is off, thanks Angelo DiNardi
- fixed; Times (clear) character is now rendered from string unicode character for consistent output, thanks Nibbles
- fixed; allowCreate bug, thanks goodzsq
- fixed; changes to props.placeholder weren't being reflected correctly, thanks alesn
- fixed; error when escape is pressedn where
clearValue
was not passed the event, thanks Mikhail Kotelnikov - added; More tests, thanks Dave Brotherstone
- fixed; replaced usage of
component.getDOMNode()
withReact.findDOMNode(component)
for compatibility with React 0.14
- fixed; regression in 0.5.3 that broke componentWillMount, sorry everyone!
- added;
addLabelText
prop for customising the "add {label}?" text when in tags mode, thanks Fenn
- fixed; autoload issues, thanks Maxime Tyler
- fixed; style incompatibilities with Foundation framework, thanks Timothy Kempf
- fixed; bug where Select shows the value instead of the label, thanks Stephen Demjanenko
- added; 'is-selected' classname is added to the selected option, thanks Alexey Volodkin
- fixed; async options are now loaded with the initial value, thanks Pokai Chang
- fixed;
react-input-autosize
now correctly escapes ampersands (&), not actually a fix in react-select but worth noting here because it would have been causing a problem inreact-select
as well.
- added; custom option and value rendering capability, thanks Brian Reavis
- fixed; collapsing issue when single-select or empty multi-select fields are disabled
- fixed; issue where an empty value would be left after clearing all values in a multi-select field
- fixed;
esc
key incorrectly created empty options, thanks rgrzelak - adeed; New feature to allow option creation ("tags mode"), enable with
allowCreate
prop, thanks Florent Vilmart and Brian Reavis - fixed; IE8 compatibility fallback for
addEventListener/removeEventListener
, which don't exist in IE8, thanks Stefan Billiet - fixed; Undefined values when using asyncOptions, thanks bannaN
- fixed; Prevent add the last focused value when the drop down menu is closed / Pushing enter without dropdown open adds a value, thanks Giuseppe
- fixed; Callback context is undefined, thanks Giuseppe
- fixed; Issue with event being swallowed on Enter
keydown
, thanks Kevin Burke - added; Support for case-insensitive filtering when
matchPos="start"
, thanks wesrage - added; Support for customizable background color, thanks John Morales
- fixed; Updated ESLint and cleared up warnings, thanks Alexander Shemetovsky
- fixed; Close dropdown when clicking on select, thanks Nik Butenko
- added; Tests, and mocha test framework, thanks Craig Dallimore
- fixed; You can now start the example server and watch for changes with
npm start
- fixed; focus was being grabbed by the select when
autoload
andasyncOptions
were set - added;
focus
method on the component - added; support for disabled options, thanks Pasha Palangpour
- improved; more closures, less binds, for better performance, thanks Daniel Cousens
- fixed; restored
dist/default.css
- fixed; standalone example works again
- fixed; clarified dependency documentation and added dependencies for Bower
- fixed; Scoping issues in
_bindCloseMenuIfClickedOutside
, thanks bannaN - fixed; Doesnt try to set focus afterupdate if component is disabled, thanks bannaN
- improved; lodash is no longer a dependency, thanks Daniel Lo Nigro
- updated; dependencies, build process and input-autosize component
- fixed; issue with long options overlapping arrow and clear icons, thanks Rohit Kalkur
- fixed; error handling click events when the menu is closed, thanks Ilya Petrov
- fixed; issue where options will not be filtered in certain conditions, thanks G. Kay Lee
- added tests and updated dependencies
- added; ESLint and contributing guide
- fixed; incorrect
classnames
variable assignment in window scope - fixed; all ESLint errors and warnings (except invalid JSX undefined/unused vars due to ESLint bug)
- fixed; first option is now focused correctly, thanks Eivind Siqveland Larsen
- fixed; IE11 issue: clicking on scrollbar within menu no longer closes menu, thanks Rohit Kalkur
- updated; compatible with React 0.13
- improved; less/no repaint on scroll for performance wins, thanks jsmunich
- added;
onBlur
andonFocus
event handlers, thanks Jonas Budelmann - added; support for
inputProps
prop, passed to the<input>
component, thanks Yann Plantevin - changed; now using react-component-gulp-tasks for build
- fixed; issue w/ remote callbacks overriding cached options, thanks Corey McMahon
- fixed; if not
this.props.multi
, menu doesn't need handleMouseDown, thanks wenbing
- fixed; issues with the underscore/lodash dependency change, thanks Aaron Powell
- added;
disabled
prop, thanks Danny Shaw - added;
searchable
prop - set tofalse
to disable the search box, thanks Julen Ruiz Aizpuru - added;
onOptionLabelClick
prop - see #66 for docs, thanks Dmitry Smirnov - fixed;
text-overflow: ellipsis;
typo, thanks Andru Vallance
- fixed; issue adding undefined values to multiselect, thanks Tejas Dinkar
- fixed; missing
var
statement
- added; node compatible build now available in
/lib
- added;
searchPromptText
property that is displayed whenasyncOptions
is set and there are (a) no options loaded, and (b) no input entered to search on, thanks Anton Fedchenko - added;
clearable
property (defaults totrue
) to control whether the "clear" control is available, thanks Anton Fedchenko
- fixed; height issues in Safari, thanks Joss Mackison
- added; Option to specify "Clear value" label as prop for i18n
- fixed; UI now responds to touch events, and works on mobile devices! thanks Fraser Xu
- fixed; Options in the dropdown now scroll into view when they are focused, thanks Adam
- improved; Example dist is now excluded from the npm package
- fixed; More specific mixin name to avoid conflicts (css)
- fixed; Example CSS now correctly rebuilds on changes in development
- fixed; Values are now expanded correctly when options change (see #28)
- added; Option to specify "No results found" label as prop for i18n, thanks Julen Ruiz Aizpuru
- added;
filterOption
andfilterOptions
props for more control over filtering
- added;
matchPos
option to control whether to match thestart
orany
position in the string when filtering options (default:any
) - added;
matchProp
option to control whether to match thevalue
,label
orany
property of each option when filtering (default:any
)
- fixed; screen-readers will now read "clear value" instead of "times" for the clear button
- fixed; non-left-click mousedown events aren't blocked by the control
- improved; better comparison of changes to [options] in
willReceiveProps
- fixed; now focuses the first option correctly when in multiselect mode
- fixed; fixed focused option behaviour on value change
- fixed; when filtering, there is always a focused option (#19)
- changed; using ^ in package.json to compare dependencies
- fixed; compatibility with case-sensitive file systems
- fixed; package.json pointed at the right file
- fixed; Updating state correctly when props change
- improved; Build tasks and docs
- added; Working standalone build
- added; Minified dist version
- added; Publised to Bower
- fixed; backspace event being incorrectly cancelled
- fixed; issue where backspace incorrectly clears the value (#14)
- changed; Major rewrite to improve focus handling and internal state management
- added; Support for
multi
prop, enable multiselect mode
- added; Support for
onChange
event - added;
propTypes
are defined by theSelect
component now - added;
className
property, sets theclassName
on the outerdiv
element - fixed; Removed deprecated
React.DOM.x
calls
- updated; React to 0.12.0
- fixed; Error keeping value when using Async Options