How to refresh select option list after AJAX response
<p>I use fastSelect plugin <a href="http://dbrekalo.github.io/fastselect/" rel="nofollow noreferrer">http://dbrekalo.github.io/fastselect/</a>
I have input tag, when change value i do a call ajax to php server.
My problem is that When I inspect the item and I look in the options, I see the data I just added, but in the browser it does not display, sorry for the quality of my English
any help please ?</p>

<p>Enclosed my code</p>

<pre><code>                    &lt;select id="Recherche_log_commune" name="Recherche[log_commune][]" class="multipleSelectDepCom" multiple="multiple"&gt;
                                &lt;optgroup label="Communes"&gt;
                                &lt;/optgroup&gt;         
                    &lt;/select&gt;
                    &lt;script&gt; $('.multipleSelectDepCom').fastselect({maxItems: 10,noResultsText: 'Pas de résultat'}); &lt;/script&gt;
                    &lt;script&gt; 
                    $("#leftBlockDashboard .fstQueryInput").on("change paste keyup", function(event) {
                        event.preventDefault();
                        getCommuneAndDepartement($(this).val());
                    });
                    function getCommuneAndDepartement(expression) {
                        var dataString = {expression: expression};
                        $.ajax({
                            url: '{{path('get_commune_departement')}}',
                            type: "POST",
                            data: dataString,
                            success: function(data){
                                $("#Recherche_log_commune").find('optgroup[label="Communes"]').empty();

                                $.each(data, function(){
                                    var option = '&lt;option value="'+ this.com_id +'"&gt;'+ this.com_libelle +'&lt;/option&gt;';
                                    $("#Recherche_log_commune").find('optgroup[label="Communes"]').append(option);
                                });

                                $('.multipleSelectDepCom').fastselect({
                                    maxItems: 10,
                                    noResultsText: 'Pas de résultat',
                                });
                            }
                        })
                    }
                    &lt;/script&gt;
</code></pre>

<p><a href="https://i.stack.imgur.com/FoWic.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FoWic.png" alt="browser"></a></p>

<p><a href="https://i.stack.imgur.com/Lwcav.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Lwcav.png" alt="when i inspect element"></a></p>