I have a function that sets the cell type to an autocomplete:
const createFactCells = function(coordinates) {
var i = coordinates['row']
var addCoordsList = []
while (i <= coordinates['row2']) {
hot.setCellMetaObject(i, coordinates['column'],
{
type: 'autocomplete',
source: Object.keys(localFacts['facts']),
strict: true,
allowInvalid: false,
labelType: 'fact'
});
i = i + 1
};
hot.render();
hot.selectCell(coordinates.row, coordinates.column);
}
When I want to revert this back to a text cell, I run the following function. The cell becomes’s cell type. but I am not able to edit the contents (keeps defaulting back to the old value). How do I fix this?
hot.setCellMetaObject(i, j, {type: 'text');