1
I have the following "type" button in the image, when I click it opens a dropdonw, when I click an item in the dropdonw opens a collapser with more options.
I need that when selecting the option in the dropdonw the text in the "type" button switches to the selected option and opens the collapser. When I click on the option it changes the text of the button but does not open the collapse, as in the example below
<select class="input flex-iten-2 flex-margin dropdown btn btn-secondary dropdown-toggle" data-val=" true " data-val-required="Campo Assunto é obrigatório. " id="Assunto " name="Assunto "><option>Selecione</option>
<option><a class="dropdown-item" href="#"> <button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample2" aria-expanded="false" aria-controls="collapseExample">
</button> Tradutor</a> </option>
<option> <a class="dropdown-item" href="#">Afiliado</a></option>
<option> <a class="dropdown-item" href="#">Cartório </a></option>
<option> <a class="dropdown-item" href="#">Frete</a></option>
</select>
<div class="collapse" id="collapseExample2">
<div class="card card-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.
</div>
</div>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
Bah Calarra hadn’t noticed that, thank you very much.
– Carlos Leutz