Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

87
Vistas
Vue Table with draggable rows won't get exported reordered

High I'm new at programming in Vue, but I want to use Vue Leaflet. So I made thiggs simplified version of my program which highlights a major programming problem I have.

The code
See link: https://codesandbox.io/s/icy-shadow-xpxzww?file=/index.html

The goal
To make a table
1. with draggable rows
2. with data which can be imported
3. with data which can be added and removed
4. And then the data can be reordered
5. And then export the data
6. And do it all in html and js

What I have done so far
I had no problems with everything except for number 4. I tried vue.draggable, however I could not get it to reorder at all. So I used the HTML Drag and Drop API (https://www.w3schools.com/html/html5_draganddrop.asp). When you select a row, the first column will restart with counting the indices from top to bottom. But that leads to the problem.

The problem
My code doesn't have a function or method which sends info about the reordering of the rows to the save file function and I do not see how I can implement that. Can someone help me out? Thanks in advance.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Change the dragover function so that it includes the array.splice function from this youtube clip from webdevtv: https://www.youtube.com/watch?v=syfUi_n-tv8

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda