I'm trying to use editTemplate to create a blank text box. After I add the editTemplate and then try to edit the row.
Uncaught TypeError: Cannot read properties of undefined (reading 'val') at TextField.editValue (jsgrid.js:1982) at Grid.<anonymous> (jsgrid.js:1338) at TextField.<anonymous> (jsgrid.js:460) at Function.each (jquery.js:385) at Grid._eachField (jsgrid.js:458) at Grid._getEditedItem (jsgrid.js:1336) at Grid._getValidatedEditedItem (jsgrid.js:1286) at Grid.updateItem (jsgrid.js:1277) at jsgrid.js:2480 at HTMLInputElement.<anonymous> (jsgrid.js:2502)
I get this. If I remove the editTemplate then it works but submits the original value.
Here is the definition for the field I'm working with
I'm trying to use editTemplate to create a blank text box. After I add the editTemplate and then try to edit the row.
Uncaught TypeError: Cannot read properties of undefined (reading 'val') at TextField.editValue (jsgrid.js:1982) at Grid.<anonymous> (jsgrid.js:1338) at TextField.<anonymous> (jsgrid.js:460) at Function.each (jquery.js:385) at Grid._eachField (jsgrid.js:458) at Grid._getEditedItem (jsgrid.js:1336) at Grid._getValidatedEditedItem (jsgrid.js:1286) at Grid.updateItem (jsgrid.js:1277) at jsgrid.js:2480 at HTMLInputElement.<anonymous> (jsgrid.js:2502)
I get this. If I remove the editTemplate then it works but submits the original value. Here is the definition for the field I'm working with
{ name: 'ticket_notes', title: 'Note', type: 'text', width: 120, editTemplate: function(value,item) { return "<input type='text'></input>"; }, insertValue: function() { return this._insertAuto.val(); }, itemTemplate: function(value) { if(value) { title = value.split("<br>").join("
"); return this._insertAuto = $("<div title='"+title+"'>"+value+"</div>"); } else { return ""; } }, },
And here's the entire grid definition. `$(document).ready(function(){ var App = { url: 'process/tickets.php', }
});`