From 14c8f2faa17f24cc9beca70230de08c71d15bbe7 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Wed, 3 Jan 2024 10:39:24 +0100 Subject: [PATCH] chore(examples): cleanup options api example --- examples/vite/src/Basic/BasicOptionsAPI.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/vite/src/Basic/BasicOptionsAPI.vue b/examples/vite/src/Basic/BasicOptionsAPI.vue index 6c64139b..535084f9 100644 --- a/examples/vite/src/Basic/BasicOptionsAPI.vue +++ b/examples/vite/src/Basic/BasicOptionsAPI.vue @@ -5,6 +5,7 @@ import { VueFlow, isNode } from '@vue-flow/core' import { Background } from '@vue-flow/background' import { Controls } from '@vue-flow/controls' import { MiniMap } from '@vue-flow/minimap' +import type { UnwrapNestedRefs } from 'vue' export default defineComponent({ name: 'BasicOptionsAPI', @@ -45,9 +46,9 @@ export default defineComponent({ onNodeDragStop(e: FlowEvents['nodeDragStop']) { console.log('drag stop', e) }, - onPaneReady(instance: FlowEvents['paneReady']) { + onPaneReady(instance: UnwrapNestedRefs) { instance.fitView() - this.instance = instance as any + this.instance = instance }, onConnect(params: FlowEvents['connect']) { this.instance?.addEdges(params)