fleetcor-lwc 2.7.4 → 2.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -415,6 +415,14 @@ $FLT_RADIO_GROUP_CIRCLE_DISABLED_SELECTED_BG_COLOR: var(
|
|
|
415
415
|
|
|
416
416
|
## Release Notes:
|
|
417
417
|
|
|
418
|
+
- v.2.7.6
|
|
419
|
+
- Tooltip bug fix with render content
|
|
420
|
+
|
|
421
|
+
---
|
|
422
|
+
- v.2.7.5
|
|
423
|
+
- Tooltip bug fix with render content
|
|
424
|
+
|
|
425
|
+
---
|
|
418
426
|
- v.2.7.4
|
|
419
427
|
- Tooltip bug fix with render content
|
|
420
428
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import './tooltip.scss'
|
|
2
|
-
|
|
3
2
|
import { api } from 'lwc'
|
|
4
|
-
|
|
5
3
|
import { BaseElement } from 'fleetcor-lwc'
|
|
6
4
|
|
|
7
5
|
/**
|
|
@@ -13,6 +11,7 @@ export default class Tooltip extends BaseElement {
|
|
|
13
11
|
@api content
|
|
14
12
|
@api corner = 0
|
|
15
13
|
|
|
14
|
+
lastRenderedContent
|
|
16
15
|
firstSetup = true
|
|
17
16
|
leftSide = false
|
|
18
17
|
tipPositionStart = false
|
|
@@ -294,6 +293,7 @@ export default class Tooltip extends BaseElement {
|
|
|
294
293
|
// 1. find width of tooltip
|
|
295
294
|
const text = this.firstChild.querySelector('.flt-tooltip__text')
|
|
296
295
|
text.innerHTML = this.content
|
|
296
|
+
this.lastRenderedContent = this.content
|
|
297
297
|
const content = this.firstChild.querySelector('.flt-tooltip__content')
|
|
298
298
|
let contentPosition = content.getBoundingClientRect()
|
|
299
299
|
const bodyPosition = document.body.getBoundingClientRect()
|
|
@@ -355,7 +355,7 @@ export default class Tooltip extends BaseElement {
|
|
|
355
355
|
if (this.firstSetup) {
|
|
356
356
|
this.firstSetup = !this.firstSetup
|
|
357
357
|
this.update()
|
|
358
|
-
} else if (this.content !=
|
|
358
|
+
} else if (text && this.content != this.lastRenderedContent) {
|
|
359
359
|
this.update()
|
|
360
360
|
}
|
|
361
361
|
}
|