Greetings Aleksandra! I hope you’re doing well.
I’ve been trying to append new row’s data with fetch
for days but couldn’t find any working solution. I did try my best to search through stackoverflow
and this forum for potential solutions. If this is already asked please forgive me.
I’ve looked into Inserting a row with values on button click but couldn’t modify to suit my particular situation.
Below is the minimal code to describe the problem:
<script>
const hot = new Handsontable(container, {
rowHeaders: true,
colHeaders: true,
});
// Adding first row data
fetch('http://localhost:3005/00700_Data.txt')
.then(res => res.text())
.then(res => res.split(","))
.then(Data => hot.updateSettings({
data: [Data]
}));
// Question: how to append to second row, instead of overriding first row's data?
fetch('http://localhost:3005/00701_Data.txt')
.then(res => res.text())
.then(res => res.split(","))
.then(Data => hot.updateSettings({
data: [Data]
}));
</script>
Any pointer or help is much appreciated. Thank you!