I am trying to add select2 in a modal but I have this error when I click on the select.
https://ibb.co/qmkcXqF
I am using these
<link href="assets/plugins/global/plugins.bundle.css" rel="stylesheet" type="text/css"/>
<script src="assets/plugins/global/plugins.bundle.js"></script>
Hi,
To use Select2 inside Bootstrap Modal, you should pass data-dropdown-parent="#kt_modal_1"
parameter to Select2 element.
For more info please check the documentation.
Regards.
thanks, it works
initialize the variable in js.
$("#kt_docs_select2_country").select2({
templateSelection: optionFormat,
templateResult: optionFormat
});