mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-19 23:00:13 +00:00
Fix tooltips (#2197)
This commit is contained in:
parent
5e0a89319d
commit
e96a08187b
@ -42,6 +42,7 @@ export function tooltip (node: HTMLElement, options?: LabelAndProps): any {
|
|||||||
return {
|
return {
|
||||||
update (options: LabelAndProps) {
|
update (options: LabelAndProps) {
|
||||||
opt = options
|
opt = options
|
||||||
|
if (node !== storedValue.element) return
|
||||||
const shown = !!(storedValue.label !== undefined || storedValue.component !== undefined)
|
const shown = !!(storedValue.label !== undefined || storedValue.component !== undefined)
|
||||||
if (shown) {
|
if (shown) {
|
||||||
showTooltip(opt.label, node, opt.direction, opt.component, opt.props, opt.anchor, opt.onUpdate, opt.kind)
|
showTooltip(opt.label, node, opt.direction, opt.component, opt.props, opt.anchor, opt.onUpdate, opt.kind)
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
size={'small'}
|
size={'small'}
|
||||||
on:select={(result) => {
|
on:select={(result) => {
|
||||||
if (result.detail !== undefined) {
|
if (result.detail !== undefined) {
|
||||||
|
if (viewlet?._id === result.detail.id) return
|
||||||
viewlet = viewlets.find((vl) => vl._id === result.detail.id)
|
viewlet = viewlets.find((vl) => vl._id === result.detail.id)
|
||||||
if (viewlet) setActiveViewletId(viewlet._id)
|
if (viewlet) setActiveViewletId(viewlet._id)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user