I am using crayons v3 select to load options using datesource in the custom installation page.
I have replicated the same logic as mentioned in the demo code. But the select options are not getting loaded.
My test code:
var iconDataSource = [
{
value: '1',
text: 'Luffy',
subText: 'Pirate King',
},
{
value: '2',
text: 'Zorro',
subText: 'Best Swordsman',
},
{
value: '3',
text: 'Sanji',
subText: 'Best Chef',
},
];
var iconVariant = document.getElementById('complexSelect');
console.log(`iconVariant before`, iconVariant);
console.log(`iconVariant options before`, iconVariant.options);
iconVariant.options = iconDataSource;
console.log(`iconVariant after`, iconVariant);
console.log(`iconVariant options after`, iconVariant.options);
Log screenshot:
Please help me here.