Documentation states that “If you want to parse data in addition to the existing dataset, specify position of parsing, namely the index from which you insert new data:”
If indexToStart equals to any number greater then zero and less then $$(“datatable”).count() - everything works as expected, old rows get updated according to parsed data. But if indexToStart = 0, then a new row is added, instead of an old one being updated. I suspect that there is a line like
The point is that thepos inparse() has no possibility to add the data to the 0-position. It’s not a bug, but a feature due to the data processing.
If you need to add a single entry to the top, please use theadd method:
datatable.add({ id:'some', value:'some' }, 0)
The same method can be used for adding an array of data, but with one important thing: as theadd triggers the rendering each added item, you need to use the (un)blockEvent API to avoid multiple repainting: