I am using extJs 6. I have code like below, it can be a text box or anything else also. I want to make a common repo for all the fields and then include in the reports by using xtype or something else, because same code will be used in multiple reports.
items: [
{
xtype: 'combo',
fieldLabel: 'year',
name: 'Year',
displayField: 'Key',
valueField: 'Year',
value: new Date().getFullYear(),
store: {
type: 'years'
}
},
It should look like
items: [
{
xtype: 'yearfield'
},
]
or
items: [
xtype: 'yearfield'
]
As what should i define these fields and what should it extend.