From 1d2322eb46a802bb3a296915f070d3a7a696ab49 Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Fri, 13 May 2022 10:11:50 +0200 Subject: [PATCH] examples: Update node example color --- examples/src/UpdateNode/UpdateNodeExample.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/src/UpdateNode/UpdateNodeExample.vue b/examples/src/UpdateNode/UpdateNodeExample.vue index 1e35f428..b76fe98b 100644 --- a/examples/src/UpdateNode/UpdateNodeExample.vue +++ b/examples/src/UpdateNode/UpdateNodeExample.vue @@ -9,8 +9,8 @@ const initialElements: Elements = [ ] const elements = ref(initialElements) -const opts = ref({ - bg: '#eee', +const opts = reactive({ + bg: '#eeeeee', name: 'Node 1', hidden: false, }) @@ -19,9 +19,9 @@ const updateNode = () => { elements.value.forEach((el) => { if (el.id === '1') { // it's important that you create a new object here in order to notify react flow about the change - el.label = opts.value.name - el.style = { backgroundColor: opts.value.bg } - el.hidden = opts.value.hidden + el.label = opts.name + el.style = { backgroundColor: opts.bg } + el.hidden = opts.hidden } }) }