ant-design/components/tooltip/demo/destroy-tooltip-on-hide.md
2022-05-23 14:37:16 +08:00

556 B

order debug title
4 true
zh-CN en-US
隐藏后销毁 Destroy tooltip when hidden

zh-CN

通过 destroyTooltipOnHide 控制提示关闭时是否销毁 dom 节点。

en-US

Setting destroyTooltipOnHide to control whether destroy dom node of tooltip when hidden.

import { Tooltip } from 'antd';
import React from 'react';

const App: React.FC = () => (
  <Tooltip destroyTooltipOnHide={{ keepParent: false }} title="prompt text">
    <span>Tooltip will destroy when hidden.</span>
  </Tooltip>
);

export default App;