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 {
239
239
}
240
240
// Get the tooltip content
241
241
// calculate in this phrase so that tip width height can be detected
242
- const { multiline} = this . props
242
+ const { multiline, getContent } = this . props
243
243
const originTooltip = e . currentTarget . getAttribute ( 'data-tip' )
244
244
const isMultiline = e . currentTarget . getAttribute ( 'data-multiline' ) || multiline || false
245
245
@@ -276,6 +276,19 @@ class ReactTooltip extends Component {
276
276
} , ( ) => {
277
277
if ( scrollHide ) this . addScrollListener ( e )
278
278
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
+ }
279
292
} )
280
293
}
281
294
You can’t perform that action at this time.
0 commit comments