palantir/blueprint

Tooltip support for select target

オープン

#3,433 opened on 2019/03/20

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (2,167 件のフォーク)batch import
P3Package: corePackage: selectType: enhancementhelp wanted

Repository metrics

Stars
 (20,263 個のスター)
PR merge metrics
 (平均マージ 43d 10h) (30d で 27 merged PRs)

説明

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

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