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
The example code given for the Combobox component needs to be updated, onInputChange I believe should be onFilterValueChange. Related to #29566 and #28492.
If I define onInputChange as in the example, I get the console error Uncaught TypeError: onFilterValueChange is not a function. If I define onFilterValueChange instead of onInputChange I no longer get the error.
And I see that the onChange event on the component is calling onInputChange:
. onFilterValueChange however doesn't have an internal definition but depends on whatever function is passed to it, whereas onInputChange has it's own internal definition so I believe shouldn't be overridden?
Basically I'm pretty sure the example needs to be updated from onInputChange to onFilterValueChange in the component parameters.
The text was updated successfully, but these errors were encountered:
Related: WPSE #385474 - the user who posed the question had no idea of onFilterValueChange's existence, let alone that it was required as the documentation presents it as optional.
The WPSE question took three months to resolve because the error as presented was obfuscated due to the lack of sourcemaps in core and/or plugin distributions of Gutenberg - see #15732. The error that the developer received was "p is not a function".
The example code given for the
Combobox
component needs to be updated,onInputChange
I believe should beonFilterValueChange
. Related to #29566 and #28492.If I define
onInputChange
as in the example, I get the console errorUncaught TypeError: onFilterValueChange is not a function
. If I defineonFilterValueChange
instead ofonInputChange
I no longer get the error.And I see that the
onChange
event on the component is callingonInputChange
:gutenberg/packages/components/src/combobox-control/index.js
Line 218 in 7c7f866
which in turn is calling
onFilterValueChange
:gutenberg/packages/components/src/combobox-control/index.js
Line 150 in 7c7f866
onFilterValueChange
however doesn't have an internal definition but depends on whatever function is passed to it, whereasonInputChange
has it's own internal definition so I believe shouldn't be overridden?Basically I'm pretty sure the example needs to be updated from
onInputChange
toonFilterValueChange
in the component parameters.The text was updated successfully, but these errors were encountered: