-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update README.md to include 'valueComponent' prop #1803
Conversation
Thanks to some very helpful feedback I received in this repo (and reading through some issues other users were having) I found there was a valueComponent prop that I could utilize that made my life so much easier. I think it needs to be included in the list of available props in the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lstuartfry thank you for this! Just a couple minor comments and we can get this merged in.
README.md
Outdated
@@ -400,6 +400,7 @@ function onInputKeyDown(event) { | |||
| loadingPlaceholder | string\|node | 'Loading...' | label to prompt for loading search result | | |||
| tabSelectsValue | bool | true | whether to select the currently focused value when the `[tab]` key is pressed | | |||
| value | any | undefined | initial field value | | |||
| valueComponent | func | undefined | function that returns a user-created component to render in the value field `() => <CustomComponent ... />` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value for a valueComponent
is a Value component and not undefined. 😄
This is a nit but to match the wording/format of the other documentation can you update it to say
function which returns a custom way to render/manage the value selected. <CustomValue />
(edited with suggested changes made)
No problem, changes have been committed. |
…ate_and_add_creatable_options * commit '26169305a721ec3099a912cea2f6ed38e6dc9c4c': (36 commits) Fix Usage Docs Example (JedWatson#1799) Hide create option after closing menu (JedWatson#1306) Update README.md to include 'valueComponent' prop (JedWatson#1803) Adding merged changes to changelog Fix backspace handling for non-multi select controls. Fixes JedWatson#638 (JedWatson#773) Update Select.js [ADD] Clarified the onInputChange prop signature in the docs (JedWatson#1773) [FIX] JedWatson#1651 moved option prop sync to componentWillReceiveProps (JedWatson#1765) v1.0.0-rc.5 Updating build Update changelog Fix selected option focus when valueKey is not "value" (JedWatson#1733) Fix aria owns value (JedWatson#1556) Fix JedWatson#1394 (JedWatson#1395) v1.0.0-rc.4 Bumping create-react-class and prop-types Update react-input-autosize dep added variables for shadow styles Move over examples to use new pkgs Migrate rest of src overto createClass pkg ... # Conflicts: # dist/react-select.js # dist/react-select.min.js # examples/dist/bundle.js # examples/dist/standalone.js # lib/Async.js # lib/Value.js
Thanks to some very helpful feedback I received in this repo (and reading through some issues other users were having) I found there was a valueComponent prop that I could utilize that made my life so much easier. I think it needs to be included in the list of available props in the docs.