Hello!
I’m using Vuejs and trying to add a new data to the first row every time when a new array added.
I’m making a small interface to manage the map related data(like node, link, vertax). When I add a new item(like nodes)with that interface(created with leaflet.draw.js) button, Handsontable also will get updated data. But the thing is that even I did columnSorting ‘desc’, whenever I add a new item, columnSorting changes to ‘asc’ automatically and all the new data is adding to the next row(currentIndex +1) But I need to add them to row at index 0 everytime…
I’ve added a png file. Hope it’s understandable! Please advise me if anyone knows how to do it!
Can you prepare a demo that we’ll be able to discuss and rebuild? I can see that you have two tables so I’d need to know what are the exact steps on each of the arrays. When you sort and when you add the data.
@aleksandra_budnik
Hello! I’ve sent you a support email. I have 3 tables:
node
2: link
3: tracer(short in tfdt)
in our production, we made 3 components.
grand-parent: map container, where handsontables are, import Map, HotTable
parent: map component, import GrandChildComponent
grand-child: leaflet-draw-wrapper container where adding a new component event occures.
When I add a new data by using left-side buttons(top 3 buttons for adding a new/ below’s are for the additional functions like move, copy, and so on), it send a new data to vuex and handsontable will get that new data, and then display it desc. but now, it’s being displayed as asc not desc. but default sorting is desc as I’ve setup.
Default is desc by Id(column 0), and same for when adding a new data. new data will get maxId +1 and has to be sorted desc.