Select2, Laravel 7x, and Bootstrap4 Issues

  1. Placeholders in bootstrap4 modal windows. I’ve tried suppressing normal modal behavior with the following:
$.fn.modal.Constructor.prototype._enforceFocus = function() {};

I’ve also tried assigning the dropdownParent, making placeholder an object in the select2 configuration, using data-placeholder in the HTML, and removing the tab-index="-1" from the modal HTML.

None of these have worked to make the placeholder show up in the modal window.

  1. NOT in a modal, but still using bootstrap4 and laravel 7.x, When I click on a multi-select with optgroups, and select an option, the option does NOT appear in the input box. If I select a second item from the list, both appear. THEN when I attempt to backspace out the second selection, it selects ALL of the options in every optgroup, and in this case, there are literally hundreds of options for them to choose from.

I’ve scoured the internet and I’m coming up short. Any advice would be much appreciated.

The fix for the second (2) issue seems to be in removing the placeholder completely. I have removed the placeholder for the problematic optgroup select box, and it’s no longer an issue.

The first issue remains, however.