Skip to content

Commit d0e106b

Browse files
author
Michał Nykiel
committed
fix tooltip positioning
1 parent 57d1fb8 commit d0e106b

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

src/components/Dropdown/DropdownCheckboxItem.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,13 @@
6464
overflow: hidden;
6565
white-space: nowrap;
6666
text-overflow: ellipsis;
67-
display: flex;
6867
height: 40px;
6968
}
7069
70+
.dropdown-checkbox-item.checkbox-wrapper {
71+
display: flex;
72+
}
73+
7174
.dropdown-checkbox-item:hover {
7275
background-color: rgb(244, 245, 247);
7376
color: rgb(23, 43, 77);

src/components/Tooltip/Tooltip.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@
6969
this.show = false;
7070
},
7171
append() {
72-
document.body.appendChild(this.$refs.popper.$el);
72+
if (this.$refs.popper) {
73+
document.body.appendChild(this.$refs.popper.$el);
74+
}
7375
}
7476
}
7577
};

src/components/Tooltip/TooltipContent.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
:placement="placement"
88
:offset="offset"
99
:with-delay="withDelay">
10-
<span class="label"
11-
:disabled="disabled">
10+
<span class="label">
1211
{{ label }}
1312
</span>
1413
</Popper>

src/directives/tooltip.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* eslint-disable no-underscore-dangle */
2+
import Vue from 'vue';
23
import TooltipContent from '../components/Tooltip/TooltipContent.vue';
34

45
function createTooltipComponent(el, context) {
@@ -59,7 +60,9 @@ function createTooltip(TooltipComponent, props) {
5960

6061
const tooltipInstance = new TooltipComponent();
6162
tooltipInstance.update(props);
62-
tooltipInstance.$mount(tooltipContainer);
63+
Vue.nextTick(() => {
64+
tooltipInstance.$mount(tooltipContainer);
65+
});
6366
return tooltipInstance;
6467
}
6568

0 commit comments

Comments
 (0)