Closed jankrnavek closed 7 months ago
1)you have a type in editable - remove ' " ' 2)render is an object key, so it must be set as: render: (rec,ext) => {} or render: function(rec,ext){}
Sorry for typos. The previous code I wrote by hand. The new one doesn't work as well. (see below)
{
min: "20",
size: "28px",
sortable: true,
resizable: false,
autoResize: false,
searchable: false,
field: "star",
text: '<span class="fa-regular fa-star"></span>',
hidden: false,
hideable: true,
editable: {"type": "checkbox", "style": "text-align: center"},
render: function(record, extra) {
if (extra.value) {
return '<span class="fa fa-star"></span>'
} else {
return '<span class="fa-regular fa-star"></span>'
}
}
}
Well, editable fields do not support custom renderers on top. If you do use your own renderer, then you can implement your own logic for editable fields.
Here is a JS Fiddle https://jsfiddle.net/chax2j4k/2/
I tried to use a custom render function for the column "type": "checkbox", but without success. I still see the standard HTML checkbox. Where am I wrong, or is it a bug?