palantir/blueprint

[TimezonePicker] 'inputProps' does not override search behavior.

Open

#4,353 opened on Sep 30, 2020

View on GitHub
 (2 comments) (0 reactions) (0 assignees)TypeScript (20,263 stars) (2,167 forks)batch import
P3Type: bughelp wanted

Description

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...

Contributor guide

[TimezonePicker] 'inputProps' does not override search behavior. · palantir/blueprint#4353 | Good First Issue