I have a collection of child panels within a container that are being dynamically added using an object.
const childItems = [
{
title: 'xyz',
tagName:'overview'
},
{
title: 'eabc',
tagName:'overview'
},
{
title: 'aedf',
tagName:'overview'
}
];
The above object is retrieved from a backend call. I am creating panel objects using this object and adding them to my container as shown below.
let panelArray = [];
for(let i=0; i < childItems.length; i++){
panelArray.push({
xtype:'panel',
title: childItems[i].title
});
}
Ext.suspendLayouts();
container.add(panelArray);
Ext.resumeLayouts();
The child panels are not coming in alphabetical order from the backend call. I would like all child panels to display alphabetically based on their title property. Any assistance would be appreciated.