You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 20, 2021. It is now read-only.
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
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -232,6 +232,7 @@ tag array, `changed` which is an array of the tags that have changed and
232
232
##### onChangeInput
233
233
234
234
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)
235
236
236
237
##### addKeys
237
238
@@ -243,7 +244,7 @@ A string to set a value on the input.
243
244
244
245
##### inputValue
245
246
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)
0 commit comments