palantir/blueprint

Tooltip support for select target

Open

#3,433 opened on 2019年3月20日

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

説明

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

コントリビューターガイド