Skip to content

Commit

Permalink
fix(form): when collapse is folded, tooltip does not show (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
mengshang918 committed Jun 23, 2022
1 parent 70f9a4c commit adf9d43
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/drip-form/src/container/ObjectContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
* @Author: jiangxiaowei
* @Date: 2021-08-11 15:26:55
* @Last Modified by: jiangxiaowei
* @Last Modified time: 2022-06-15 14:53:37
* @Last Modified time: 2022-06-23 15:22:54
*/
import React, { useMemo, memo } from 'react'
import React, { useMemo, memo, useEffect } from 'react'
import { useTitle } from '@jdfed/hooks'
import ReactTooltip from 'react-tooltip'
import renderCoreFn from '../../render'
import { Title, CommonContainerHoc } from '@form/components/index'
import cx from 'classnames'
Expand Down Expand Up @@ -106,6 +107,10 @@ const objectContainer = memo<Props & RenderFnProps & ObjectContainerProps>(
return formMode === 'generator' || active ? [curKey] : []
}, [formMode, curKey, active])

useEffect(() => {
ReactTooltip.rebuild()
})

return (
<>
{isCollapse ? (
Expand Down

0 comments on commit adf9d43

Please sign in to comment.