First commit
This commit is contained in:
47
application/demo/pages/search.input.js
Normal file
47
application/demo/pages/search.input.js
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
import input from "/elements/input.js";
|
||||
|
||||
|
||||
|
||||
|
||||
export default class searchBar extends input {
|
||||
|
||||
placeholder = "Search."
|
||||
|
||||
placeholderColor = "#8e8e8e"
|
||||
|
||||
webkitTextFillColor = "none";
|
||||
|
||||
async keyup( event ) {
|
||||
|
||||
this.search();
|
||||
|
||||
//newsItems.value = value;
|
||||
|
||||
//newsItems.sync();
|
||||
|
||||
}
|
||||
|
||||
async search() {
|
||||
|
||||
var searchType = this.parent.select.customElement.selectedIndex;
|
||||
|
||||
var searchTerm = this.customElement.value;
|
||||
|
||||
|
||||
console.log("searchType", searchType);
|
||||
|
||||
console.log("search input", searchTerm);
|
||||
|
||||
|
||||
var newsItems = this.parent.parent.newsListTable.body;
|
||||
|
||||
newsItems.searchType = searchType;
|
||||
|
||||
newsItems.searchTerm = searchTerm;
|
||||
|
||||
newsItems.update();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user