Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add missing tooltip-zIndex #30432

Merged
merged 2 commits into from
May 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions components/tooltip/__tests__/type.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,14 @@ describe('Tooltip.typescript', () => {
expect(tooltip).toBeTruthy();
expect(tooltip2).toBeTruthy();
});

it('Tooltip support zIndex', () => {
const tooltip = (
<Tooltip title="title" zIndex={999}>
<div />
</Tooltip>
);

expect(tooltip).toBeTruthy();
});
});
1 change: 1 addition & 0 deletions components/tooltip/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ The following APIs are shared by Tooltip, Popconfirm, Popover.
| placement | The position of the tooltip relative to the target, which can be one of `top` `left` `right` `bottom` `topLeft` `topRight` `bottomLeft` `bottomRight` `leftTop` `leftBottom` `rightTop` `rightBottom` | string | `top` | |
| trigger | Tooltip trigger mode. Could be multiple by passing an array | `hover` \| `focus` \| `click` \| `contextMenu` \| Array&lt;string> | `hover` | |
| visible | Whether the floating tooltip card is visible or not | boolean | false | |
| zIndex | Config `z-index` of Tooltip | number | - | |
| onVisibleChange | Callback executed when visibility of the tooltip card is changed | (visible) => void | - | |

## Note
Expand Down
1 change: 1 addition & 0 deletions components/tooltip/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/Vyyeu8jq2/Tooltp.svg
| placement | 气泡框位置,可选 `top` `left` `right` `bottom` `topLeft` `topRight` `bottomLeft` `bottomRight` `leftTop` `leftBottom` `rightTop` `rightBottom` | string | `top` | |
| trigger | 触发行为,可选 `hover` \| `focus` \| `click` \| `contextMenu`,可使用数组设置多个触发行为 | string \| string\[] | `hover` | |
| visible | 用于手动控制浮层显隐 | boolean | false | |
| zIndex | 设置 Tooltip 的 `z-index` | number | - | |
| onVisibleChange | 显示隐藏的回调 | (visible) => void | - | |

## 注意
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
"rc-table": "~7.13.0",
"rc-tabs": "~11.7.0",
"rc-textarea": "~0.3.0",
"rc-tooltip": "~5.1.0",
"rc-tooltip": "~5.1.1",
"rc-tree": "~4.1.0",
"rc-tree-select": "~4.3.0",
"rc-trigger": "^5.2.1",
Expand Down