palantir/blueprint
[TimezonePicker] 'inputProps' does not override search behavior.
开放
#4,353 创建于 2020年9月30日
P3Type: bughelp wanted
仓库指标
- 星标
- (20,263 个星标)
- PR 合并指标
- (平均合并 43天 10小时) (30 天内合并 27 个 PR)
描述
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...