mapserver/server/static/js/search/SearchInput.js

18 lines
478 B
JavaScript
Raw Normal View History

var SearchInput = {
view: function(){
function handleInput(e){
2019-04-14 20:51:31 +03:00
SearchStore.search(e.target.value);
}
2019-04-14 20:51:31 +03:00
return m("div", { class: "input-group mb-3" }, [
m("div", { class: "input-group-prepend" }, [
m("span", { class: "input-group-text" }, [
m("i", { class: "fa fa-search"})
])
]),
m("input[type=text]", { placeholder: "Search", class: "form-control", oninput: handleInput, value: SearchStore.query })
]);
}
}