Files
Unify/application/demo/pages/search.input.js
2025-12-25 11:16:59 +01:00

47 lines
679 B
JavaScript

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();
}
}