I am working on something like there will be select dropdowns. a datatable below will be filtered as per dropdown selection. And there's a button - Reset, in which if its pressed the filter and sorting will be back to normal. Problem is when I reset table, which changes dropdown value and text, it doesn't change the selected option text - view all (when reset), but value works fine.
Select Dropdown
<div class="input-group-prepend">
<div class="input-group-text">
Order Status
</div>
</div><!-- input-group-prepend -->
<select name="orderStatus" id="orderStatus" class="statusbox SlectBox form-control">
<?php echo status(); ?>
</select>
Reset Button
$('#resetTable').click(function() {
$("select.statusbox").val($("select.statusbox option:first").val()).change();
});
where I am making the mistake? Video: streamable.com/fdz5q1