Tabulator - 样式化空单元格
Tabulator - Styling empty cells
我正在尝试仅设置制表符空单元格的样式。
我尝试使用自定义格式化程序,但它似乎只在有数据的单元格上调用。
关于如何进行的任何建议?
似乎可以很好地处理没有数据的字段...
https://jsfiddle.net/udpr2680/
new Tabulator("#tabulator", {
data:[{id:4957},{id:39857,price:100}],
columns: [
{ title: "number", field: "id"},
{ title: "price", field: "price",formatter: function(c,fP,onR) { let p = c.getData().price; if (p === undefined) return "undefined"; return p; } },
],
});
我正在尝试仅设置制表符空单元格的样式。 我尝试使用自定义格式化程序,但它似乎只在有数据的单元格上调用。 关于如何进行的任何建议?
似乎可以很好地处理没有数据的字段...
https://jsfiddle.net/udpr2680/
new Tabulator("#tabulator", {
data:[{id:4957},{id:39857,price:100}],
columns: [
{ title: "number", field: "id"},
{ title: "price", field: "price",formatter: function(c,fP,onR) { let p = c.getData().price; if (p === undefined) return "undefined"; return p; } },
],
});