Fix tooltips (#2197)

This commit is contained in:
Alex 2022-07-03 18:14:34 +07:00 committed by GitHub
parent 5e0a89319d
commit e96a08187b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -42,6 +42,7 @@ export function tooltip (node: HTMLElement, options?: LabelAndProps): any {
return {
update (options: LabelAndProps) {
opt = options
if (node !== storedValue.element) return
const shown = !!(storedValue.label !== undefined || storedValue.component !== undefined)
if (shown) {
showTooltip(opt.label, node, opt.direction, opt.component, opt.props, opt.anchor, opt.onUpdate, opt.kind)

View File

@ -36,6 +36,7 @@
size={'small'}
on:select={(result) => {
if (result.detail !== undefined) {
if (viewlet?._id === result.detail.id) return
viewlet = viewlets.find((vl) => vl._id === result.detail.id)
if (viewlet) setActiveViewletId(viewlet._id)
}