palantir/blueprint
在 GitHub 查看[TimezonePicker] 'inputProps' does not override search behavior.
Open
#4,353 建立於 2020年9月30日
P3Type: bughelp wanted
描述
Steps to reproduce
<TimezonePicker
...
inputProps={{
value: this.searchQuery,
onChange: this.handlerWhichShouldBeCalledButItIsnt
}}
>
Actual behavior
Callback for search input change is not called.
Expected behavior
According to docs callback for search input change should override Select's behavior and should be called.
Possible solution
The onQueryChange prop which you pass to Select in timezonePicker.tsx is just:
private handleQueryChange = (query: string) => this.setState({ query });
No mentions about inputProps.onChange.
And as I understand in Select onQueryChange has some priority over inputProps.onChange.
Thus my callback which I pass to TimezonePicker is not called.
But it's just an assumption.
Please let me know if I do something wrong...