react-select icon indicating copy to clipboard operation
react-select copied to clipboard

Document action types

Open melissachang opened this issue 8 years ago • 2 comments

Here's what I gather from console.log's:

  • select-option - Add new chip
  • deselect-option - Can't figure out how to trigger this
  • remove-value - Remove chip
  • pop-value - Can't figure out how to trigger this
  • set-value - Can't figure out how to trigger this
  • clear - Remove all chips
  • create-option - Can't figure out how to trigger this

melissachang avatar Sep 13 '18 18:09 melissachang

For those coming here from Google, the documentation has been updated: https://react-select.com/advanced#action-meta

Action Meta

  React Select exposes a variety of eventListeners to you via props.
  The onchange function prop now has the following signature.
  (value: ValueType, action: ActionType) => undefined;

  The action argument is a string with the following possible values

  * 'select-option': Selecting an option from the list
  * 'deselect-option': (Multiple) Deselecting an option from the list
  * 'remove-value': (Multiple) Removing a selected option with the remove button
  * 'pop-value': Removing options using backspace
  * 'set-value': Calling setValue from a component without an action
  * 'clear': Removing all selected options with the clear button
  * 'create-option': (Creatable) Creating a new option

samuelstevens9 avatar May 02 '19 19:05 samuelstevens9

Hello -

In an effort to sustain the react-select project going forward, we're closing old issues.

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our efforts towards the current major version.

If you aren't using the latest version of react-select please consider upgrading to see if it resolves any issues you're having.

However, if you feel this issue is still relevant and you'd like us to review it - please leave a comment and we'll do our best to get back to you!

bladey avatar May 29 '20 06:05 bladey