Skip to content

Commit

Permalink
fix: getValue - if no element, element = this.selectContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Oct 3, 2022
1 parent 8e0a7ad commit d13cdb0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ CoCreateSelect.prototype = {
read(selectContainer, this);

selectContainer.getValue = (element) => {
if (!element)
element = this.selectContainer
let value = Array.from(element.selectedOptions)
.map(selOption => selectedToOption.has(selOption) ? selectedToOption.get(selOption).getAttribute('value') : '');
if (value.length <= 1)
Expand Down

0 comments on commit d13cdb0

Please sign in to comment.