2019-04-14 20:17:43 +03:00
|
|
|
|
|
|
|
var SearchInput = {
|
|
|
|
view: function(){
|
|
|
|
function handleInput(e){
|
2019-04-14 20:51:31 +03:00
|
|
|
SearchStore.search(e.target.value);
|
2019-04-14 20:17:43 +03:00
|
|
|
}
|
|
|
|
|
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 })
|
|
|
|
]);
|
2019-04-14 20:17:43 +03:00
|
|
|
}
|
|
|
|
}
|