JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.8/js/select2.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.8/css/select2.min.css">
<select class="js-example-events" style="width:300px;">
<option>Select One</option>
<option>Select1</option>
</select>

<select class="js-example-events" id="s1" style="width:300px;">
<option>Selects Two</option>
<option>Select1</option>
</select>

<button onclick="test()">
Test
</button>

JavaScript

$(".js-example-events").select2();

$('.js-example-events').on("select2:open", function () {
    $("#s1").select2("open");
});
function test(){
    $("#s1").select2("open");
}