Choices
Choices copied to clipboard
Resolve #751/#773
Description
Adds new clearItems
method that can be called when using setChoices
by passing the replaceChoices
argument. Fixes #751 and #773.
Screenshots (if appropriate)
Types of changes
- [ ] Chore (tooling change or documentation change)
- [ ] Refactor (non-breaking change which maintains existing functionality)
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
Codecov Report
Merging #787 into master will increase coverage by
0.12%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #787 +/- ##
==========================================
+ Coverage 68.1% 68.22% +0.12%
==========================================
Files 22 22
Lines 1317 1322 +5
==========================================
+ Hits 897 902 +5
Misses 420 420
Impacted Files | Coverage Δ | |
---|---|---|
src/scripts/constants.js | 84.61% <ø> (ø) |
:arrow_up: |
src/scripts/actions/items.js | 100% <100%> (ø) |
:arrow_up: |
src/scripts/reducers/items.js | 100% <100%> (ø) |
:arrow_up: |
src/scripts/choices.js | 56.93% <100%> (+0.15%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update b3b7b3f...c188212. Read the comment docs.
Does this PR will born ?
Issue still open and bug still existing?
PLEASE PLEASE, we need this
clearChoices still doesn't work.
<button name="button" type="button" class="btn btn-secondary" data-action="click->check#clean"><i class="bi bi-eraser"></i> </button>
function clean(event) {
let el = event.target.closest('form').querySelector('.form-select')
let finded_choice_select = new Choices(el)
finded_choice_select.clearChoices()
}