palantir/blueprint

Tooltip support for select target

Open

#3,433 opened on Mar 20, 2019

View on GitHub
 (3 comments) (0 reactions) (0 assignees)TypeScript (20,263 stars) (2,167 forks)batch import
P3Package: corePackage: selectType: enhancementhelp wanted

Description

Environment

  • Package version(s): core@3.14.1, select@3.7.0
  • Browser and OS versions: Chrome/MacOS

Question

Is threre a recommended way to surround the Select component target with a Tooltip? It seems like the presence of Select > Popover > Tooltip > Button does not behave exactly as the description found here.

My usage is like this:

<Select>
 <Tooltip><Button/></Tooltip>
</Select>

My own workaround is to use popoverProps to observe the select popover lifecycle:

<Select
    popoverProps={{
        onOpening: () => {
            this.setState({ isTooltipDisabled: true });
        },
        onClosed: () => {
            this.setState({ isTooltipDisabled: undefined });
        }
    }}>
    <Tooltip disabled={this.state.isTooltipDisabled}><Button/></Tooltip>
</Select>

Thanks

Contributor guide

Tooltip support for select target · palantir/blueprint#3433 | Good First Issue