Spaltentyp 'currency'
Live Beispiel
Beispielcode
context.enableModules();
const { TableGadget } = require("ou.sp.gadget.TableGadget");
const gadget = new TableGadget({
showOptions: false,
showFooter: false,
select: false,
rows: [
{
amount: 100.5,
},
{
amount: 250.34,
},
{
amount: 42.42,
},
],
columns: {
amount: {
type: "currency",
label: "Betrag",
attributes: {
style: function (e: any) {
return "color:" + (e > 100 ? "red" : "inherit");
},
},
},
},
});
context.returnValue = gadget.transfer();