Skip to content
This repository was archived by the owner on Nov 20, 2021. It is now read-only.

Commit 64ffe4b

Browse files
authored
Document that onChangeInput is only called when inputValue is set
It's a bit confusing that this function isn't called if you don't set inputValue, it's probably good to be explicit about that in the readme. We found out the solution by looking at this issue olahol#123
1 parent 3b52e57 commit 64ffe4b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ tag array, `changed` which is an array of the tags that have changed and
232232
##### onChangeInput
233233

234234
Callback from the input box, gets one argument `value` which is the content of the input box.
235+
(onChangeInput is only called if the input box is [controlled](https://facebook.github.io/react/docs/forms.html#controlled-components), for this to happen both inputValue and onChangeInput need to be set)
235236

236237
##### addKeys
237238

@@ -243,7 +244,7 @@ A string to set a value on the input.
243244

244245
##### inputValue
245246

246-
Similar to `currentValue` but needed for controlling the input box.
247+
Similar to `currentValue` but needed for controlling the input box. (inputValue is only useful if you use it together with onChangeInput)
247248

248249
##### onlyUnique
249250

0 commit comments

Comments
 (0)