If the Ext docs for a config property states (for example):
icon : String
The URL of an image to display as the clickable element in the column.
Defaults to Ext.BLANK_IMAGE_URL.
does this mean it has to be a hard coded string?
Or can it be a variable that contains a string or even a variable that is a function that returns a string?
for example:
icon: myFunction()
where my function is defined elsewhere as
var myFunction = function(){
if(rec.get('NOTES') === 'Y'){
return '<img src="/icons/note.png">';
}
}
icon : String
The URL of an image to display as the clickable element in the column.
Defaults to Ext.BLANK_IMAGE_URL.
does this mean it has to be a hard coded string?
Or can it be a variable that contains a string or even a variable that is a function that returns a string?
for example:
icon: myFunction()
where my function is defined elsewhere as
var myFunction = function(){
if(rec.get('NOTES') === 'Y'){
return '<img src="/icons/note.png">';
}
}
Comment