I have a data filtration function in my app, where users can use checkboxes and dropdowns to select how they want to filter the data.
I am using the bootstrap checkboxes:
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="checkbox" autocomplete="off" checked> Checkbox 1 (pre-checked)
</label>
<label class="btn btn-primary">
<input type="checkbox" autocomplete="off"> Checkbox 2
</label>
<label class="btn btn-primary">
<input type="checkbox" autocomplete="off"> Checkbox 3
</label>
</div>
I have a clear filter buttons which clears all the users inputs from the filters, resets all checkboxes, all drop downs, all text fields.
I was able to reset drop downs like this:
// sectorPicker is drop down
document.getElementById('sectorPicker').reset();
Below is the image of my checkboxes:
But I can't figure our how to reset the Bootstrap checkboxes on the screen to uncheck all checkboxes.
Any thoughts?
Aucun commentaire:
Enregistrer un commentaire