Crayons v2 fw-select Datasource is not rendering

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:

image

Please help me here.

Hi Gopi, I have tried the code you have shared and it works properly. Please refer this sandbox link - fw-select-datasource - CodeSandbox
Are you loading it differently?

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.