pull/1196/head
Kristofer Baxter 8 years ago
parent 9ee83362f0
commit e6db5868b7

@ -169,15 +169,15 @@ export function selectOptions(select, value) {
} }
export function selectValue(select) { export function selectValue(select) {
  var selectedOption = select.options[select.selectedIndex >= 0 ? select.selectedIndex : 0]; var selectedOption = select.options[select.selectedIndex >= 0 ? select.selectedIndex : 0];
  return selectedOption && selectedOption.__value; return selectedOption && selectedOption.__value;
} }
export function selectMultipleValue(select) { export function selectMultipleValue(select) {
  var values = []; var values = [];
for (var i = 0; i < select.options.length; i += 1) { for (var i = 0; i < select.options.length; i += 1) {
var option = select.options[i]; var option = select.options[i];
    option.selected && values.push(option.__value); option.selected && values.push(option.__value);
  } }
  return values; return values;
} }
Loading…
Cancel
Save