-
Notifications
You must be signed in to change notification settings - Fork 732
Description
Short description
editable: function(record, extra) doesn't work.
What is current behavior
editable only works with object, not function.
in w2grid.js:
8476 edit = (Object.keys(col.editable ?? {}).length > 0 ? col.editable : null)
8477 if (typeof edit === 'function') {
8478 let value = this.getCellValue(ind, col_ind, false)
8479 // same arguments as col.render()
8480 edit = edit.call(this, rec, { self: this, value, index: ind, colIndex: col_ind })
8481 }
solution: 8477 and 8480, change edit to col.editable, it will work for editable when it is function.
also, many thanks to vitmalina for this great product.
8477 if (typeof col.editable === 'function') {
8478 let value = this.getCellValue(ind, col_ind, false)
8479 // same arguments as col.render()
8480 edit = col.editable.call(this, rec, { self: this, value, index: ind, colIndex: col_ind })
8481 }