Skip to content

Commit bc37551

Browse files
authored
Fixes updating of tooltip on data changes
Fixes issue #45
1 parent 9ad91ad commit bc37551

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/action.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const tooltip = (element, props) => {
1212
}
1313
};
1414

15-
const config = {
15+
let config = {
1616
...props,
1717
targetElement: element
1818
};
@@ -101,6 +101,12 @@ export const tooltip = (element, props) => {
101101
if (title) {
102102
element.setAttribute('title', title);
103103
}
104+
},
105+
update(updatedProps) {
106+
Object.assign(config, updatedProps);
107+
if (component) {
108+
component.$set(config);
109+
}
104110
}
105111
};
106112
};

0 commit comments

Comments
 (0)