JSFiddle - React, Tailwind, and code Playground
by marcusschiesser
JavaScript
Ext.onReady(function () {
// EXTJS 4.2 has a renderer for displayfields - here's how to do it in ExtJS 3.4:
var displayField = Ext.create({
xtype: 'displayfield',
fieldLabel: 'Visitor',
value: '11',
renderer: function (value) {
return 'A' + value;
},
setValue: function (v) {
this.setRawValue(this.renderer(v));
return this;
}
});
Ext.create({
xtype: 'panel',
renderTo: Ext.getBody(),
width: 175,
height: 120,
bodyPadding: 10,
title: 'Final Score',
items: [displayField]
});
});