Fix clicking-out Component Browser (#11832)

Fixes #11829

There was implicit `any` on refs, so the typechecker didn't catch missing property.
This commit is contained in:
Adam Obuchowicz 2024-12-12 00:16:27 +01:00 committed by GitHub
parent 44a8de337e
commit ffec1c8004
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 11 deletions

View File

@ -72,8 +72,6 @@ const emit = defineEmits<{
const cbRoot = ref<HTMLElement>()
const componentList = ref<ComponentInstance<typeof ComponentList>>()
defineExpose({ cbRoot })
const clickOutsideAssociatedElements = (e: PointerEvent) => {
return props.associatedElements.length === 0 ?
false

View File

@ -24,8 +24,6 @@ const props = defineProps<{
}>()
const slideInPanel = ref<HTMLElement>()
const root = ref<HTMLElement>()
defineExpose({ root })
const computedSize = useResizeObserver(slideInPanel)
const computedBounds = computed(() => new Rect(Vec2.Zero, computedSize.value))
@ -48,7 +46,7 @@ const tabStyle = {
</script>
<template>
<div ref="root" class="DockPanel" data-testid="rightDockRoot">
<div class="DockPanel" data-testid="rightDockRoot">
<ToggleIcon
v-model="show"
:title="`Documentation Panel (${documentationEditorBindings.bindings.toggle.humanReadable})`"

View File

@ -456,13 +456,10 @@ watch(
},
)
const componentBrowser = ref()
const docPanel = ref()
const componentBrowser = ref<ComponentInstance<typeof ComponentBrowser>>()
const docPanel = ref<ComponentInstance<typeof RightDockPanel>>()
const componentBrowserElements = computed(() => [
componentBrowser.value?.cbRoot,
docPanel.value?.root,
])
const componentBrowserElements = computed(() => [componentBrowser.value?.$el, docPanel.value?.$el])
// === Node Creation ===