Code Monkey home page Code Monkey logo

Comments (8)

awulkan avatar awulkan commented on September 1, 2024 1

Try setting the index to the id of the item instead of a vue-generated index number.

from vddl.

mlapeyre3 avatar mlapeyre3 commented on September 1, 2024 1

Starting from what @awulkan wrote, I set :key="item.id" and :index="itemVueGeneratedIndex"
This works (as there is no duplication or strange behavior anymore) but now I got the console warning:
Duplicate keys detected: '5'. This may cause an update error. which seems to be a known issue ( #23 and #27)

from vddl.

blackandred avatar blackandred commented on September 1, 2024 1

Sorry for not responding, I had A break in the project, I got back to it and I will test the proposed solution on Sunday or Monday. Thanks for the support.

from vddl.

awulkan avatar awulkan commented on September 1, 2024

Yes, the console warning is a known error. The app should still work as normal though. :)
I'm sure the error bug will be sorted out eventually.

from vddl.

mgthomas99 avatar mgthomas99 commented on September 1, 2024

Possible duplication of #4 ?

from vddl.

blackandred avatar blackandred commented on September 1, 2024

It seems that adding a new property "orderIndex" and making it a index for dragging does not make it working. It still copies but not duplicates that much.

from vddl.

RebeccaIsCoding avatar RebeccaIsCoding commented on September 1, 2024

As @awulkan already said. Do not take the vue generated index. Instead set the key to :key="child.id" in here 'v-for="(child, num) in category.children" :category="child" :index="num" :list="category.children" '.

from vddl.

ronaldvanderreest avatar ronaldvanderreest commented on September 1, 2024

works like a charm

from vddl.

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.