mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-29 18:46:47 +00:00
fix: Made editor prop reactive
This commit is contained in:
@@ -2,17 +2,19 @@
|
||||
import type { Editor } from '@tiptap/vue-3'
|
||||
import { BubbleMenu } from '@tiptap/vue-3'
|
||||
|
||||
const { editor } = defineProps<Props>()
|
||||
const props = defineProps<Props>()
|
||||
|
||||
interface Props {
|
||||
editor: Editor
|
||||
}
|
||||
|
||||
const editor = computed(() => props.editor)
|
||||
|
||||
// Debounce show menu to prevent flickering
|
||||
const showMenu = computed(() => {
|
||||
if (!editor) return false
|
||||
|
||||
return !editor.state.selection.empty
|
||||
return !editor.value.state.selection.empty
|
||||
})
|
||||
const showMenuDebounced = ref(false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user