Coder Social home page Coder Social logo

Comments (5)

bcakmakoglu avatar bcakmakoglu commented on May 25, 2024 1

You need to call updateNodeInternals when you suddenly change the id of an existing handle.
See this section of the docs about dynamic handles.

Here's the sandbox corrected.

<script setup>
import { Position, Handle, useNode, useVueFlow } from '@vue-flow/core';
import { ref, onMounted, nextTick } from 'vue';

const { updateNodeInternals } = useVueFlow();

const model = ref('test');

function updateModel() {
  model.value = 'test2';
  nextTick(() => {
	// you can also pass an array of ids to specify which nodes in particular to update the internals for
	// when omitted it will update *all* node internals, which might be unnecessary for this case
    updateNodeInternals();
  });
}
</script>

from vue-flow.

bcakmakoglu avatar bcakmakoglu commented on May 25, 2024 1

The docs could definitely be better 😅 I am really trying to separate some time to update them but, alas, I have regular work to do as well and it's been taking up all my time recently :(

So always feel free to ask questions / report issues, that's what I'm hear for after all.

from vue-flow.

bcakmakoglu avatar bcakmakoglu commented on May 25, 2024

Can you provide a proper repro for this please?
This ticket has barely any information to go on.

Either provide sufficient code snippets to actually figure out what the problem is or, even better, provide a sandbox reproduction for the issue - otherwise I can't help properly 😞

from vue-flow.

romgerman avatar romgerman commented on May 25, 2024

I've added repro on stackblitz.

from vue-flow.

romgerman avatar romgerman commented on May 25, 2024

Thank you for the fast answer. I guess I misunderstood the documentation.

from vue-flow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.