Browse Source

Update on confirm

pull/2535/head
Kat 2 years ago committed by kosiakkatrina
parent
commit
0a5ab7336f
  1. 4
      app/frontend/controllers/search_controller.js

4
app/frontend/controllers/search_controller.js

@ -30,8 +30,8 @@ export default class extends Controller {
name: rawFieldName, name: rawFieldName,
onConfirm: (val) => { onConfirm: (val) => {
const selectedOption = [].filter.call( const selectedOption = [].filter.call(
selectOptions, Array.from(selectEl.options).filter(function (option, index, arr) { return option.value !== '' }),
(option) => (getSearchableName(option)) === val (option) => option.value === val
)[0] )[0]
if (selectedOption) selectedOption.selected = true if (selectedOption) selectedOption.selected = true
} }

Loading…
Cancel
Save