Here is my code below:
<!DOCTYPE html>
<html>
<body>
<select id="test">
<option value="" selected=hidden>Select Product</option>
<option></option>
</select>
</body>
<script>
window.$ = window.jQuery = require('jquery');
require('select2')();
$(document).ready(function(){
let contents = ["A","B","C","D","E","F","G"];
$("#test").select2({
data:contents
});
});
</script>
</html>
I have installed both jquery and select2 as node modules. Jquery seems to work just fine. Here are photos of the electron output:
Two dropdowns appear Both can be interacted
Am I missing something simple? Thanks in advance.