palantir/blueprint

Tooltip support for select target

Open

#3 433 ouverte le 20 mars 2019

Voir sur GitHub
 (3 commentaires) (0 réactions) (0 assignés)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

Guide contributeur