File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ class ReactTooltip extends Component {
239239 }
240240 // Get the tooltip content
241241 // calculate in this phrase so that tip width height can be detected
242- const { multiline} = this . props
242+ const { multiline, getContent } = this . props
243243 const originTooltip = e . currentTarget . getAttribute ( 'data-tip' )
244244 const isMultiline = e . currentTarget . getAttribute ( 'data-multiline' ) || multiline || false
245245
@@ -276,6 +276,19 @@ class ReactTooltip extends Component {
276276 } , ( ) => {
277277 if ( scrollHide ) this . addScrollListener ( e )
278278 this . updateTooltip ( e )
279+
280+ if ( getContent && Array . isArray ( getContent ) ) {
281+ this . intervalUpdateContent = setInterval ( ( ) => {
282+ if ( this . mount ) {
283+ const { getContent} = this . props
284+ const placeholder = getTipContent ( originTooltip , getContent [ 0 ] ( ) , isMultiline )
285+ const isEmptyTip = this . isEmptyTip ( placeholder )
286+ this . setState ( {
287+ isEmptyTip
288+ } )
289+ }
290+ } , getContent [ 1 ] )
291+ }
279292 } )
280293 }
281294
You can’t perform that action at this time.
0 commit comments