Skip to content

Commit 4ffa387

Browse files
committed
fix: broken tooltip on readonly props
1 parent 847d1ec commit 4ffa387

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

doc/examples/read-only.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const schema = {
1919
title: `I'm a section with readOnly=true in schema`,
2020
readOnly: true,
2121
properties: {
22-
stringProp: { type: 'string', title: `I'm a string in a read-only section` }
22+
stringProp: { type: 'string', title: `I'm a string in a read-only section`, description: 'This description is used as a help message.' }
2323
}
2424
},
2525
disabledSection: {

lib/mixins/Tooltip.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ export default {
1919
slot,
2020
props: { value: this.tooltip.show, left: true, openOnHover: false, openOnClick: false, contentClass: 'vjsf-tooltip' },
2121
scopedSlots: {
22-
activator: () => h('v-icon', { on: { click: () => { this.tooltip.show = !this.tooltip.show } } }, this.fullOptions.icons.info)
22+
activator: () => h('v-btn', {
23+
on: { click: () => { this.tooltip.show = !this.tooltip.show } },
24+
props: { icon: true },
25+
style: 'pointer-events: auto' // necessary or the tooltip is disabled on readOnly props
26+
}, [h('v-icon', { }, this.fullOptions.icons.info)])
2327
}
2428
}, [
2529
h('div', { style: `max-width: ${this.tooltip.maxWidth}px`, domProps: { innerHTML: this.htmlDescription } })

0 commit comments

Comments
 (0)