Posted 30 August 2022, 6:45 am EST
Hi,
thanks for the sample. We found that editchange is not fireing but edit ended is getting fired properly,
The issue is you are using a custom cell type and you are creating your own custom element for editing that is why spreadJS is not aware of the changes that are being made. You may need to craete some custom event and fire it inside the input elemtn that our implementing.
Please refer to the following code snippet and let me knwo if you face any issues.
FullNameCellType.prototype.createEditorElement = function () {
var div = document.createElement("div");
div.setAttribute("gcUIElement", "gcEditingInput");
div.style.backgroundColor = "white";
div.style.overflow = "hidden";
var span1 = document.createElement('span');
span1.style.display = "block";
var input1 = document.createElement("input");
input1.id = "gcEditor";
input1.addEventListener("keydown", (e) => {
[b] //fire you custom event here to notify the edit change[/b]
console.log("edit change")
})
var type = document.createAttribute('type');
type.nodeValue = "text";
input1.setAttributeNode(type);
div.appendChild(span1);
div.appendChild(input1);
input1.focus()
return div;
};
Regards,
avinash