creativetimofficial / ct-soft-ui-design-system-pro

Soft UI Design System PRO - Premium Bootstrap 5 UI kit
https://www.creative-tim.com/product/soft-ui-design-system-pro
17 stars 2 forks source link

[Bug] Select Choices Not Rendering #26

Closed robbitt07 closed 2 years ago

robbitt07 commented 2 years ago

Version

1.0.8

Reproduction link

https://codepen.io/robbitt07/pen/PoJONKx

Operating System

Mac OS

Device

Macbook Pro 16

Browser & Version

Chrome 96.0.4664.110

Steps to reproduce

  1. Added Select Field

What is expected?

Expecting the choices.min.js to render the select input and options per the same as the documentation.

What is actually happening?

Nothing is happening, select is same as standard bootstrap.


Solution

Additional comments

rarestoma commented 2 years ago

Hi @robbitt07,

Thank you for working with our products.

You also have to add the initialization code for the select:

<script>
if (document.getElementById('choices-button')) {
    var element = document.getElementById('choices-button');
    const example = new Choices(element, {
      searchEnabled: false
    });
  }
</script>

Please let me know if it works.

Best regards, Rares

robbitt07 commented 2 years ago

@rarestoma Thank you so much for the information! Could this be added to the documentation to clarify usage of the feature? Possibly add the note of this page? https://www.creative-tim.com/learning-lab/bootstrap/choices/soft-ui-design-system

rarestoma commented 2 years ago

Hi @robbitt07,

Sure, I just added it to the 'to do' list for the next update.

Thank you, Rares

robbitt07 commented 2 years ago

Thanks @rarestoma, answered my question