Fixed a few issues with the search select component.

This commit is contained in:
MattMo 2023-10-24 18:04:36 -07:00
parent 7a4e43979c
commit 18901d2115

@ -29,10 +29,15 @@ class SearchSelect extends IgniteElement {
render() {
return this.template
.class("w-100 position-relative form-control form-control-lg d-flex flex-row justify-content-between")
.class("w-100 position-relative form-control form-control-lg d-flex flex-row justify-content-between align-items-center")
.attribute("tabindex", "0")
.onFocus(() => this.onFocus())
.child(
//Search icon
new button()
.class("btn btn-none ps-0")
.child(new i().class("fa-solid fa-magnifying-glass")),
//Placeholder
new div()
.hide([this.value, this.searching], (value, searching) => value || searching)
@ -181,7 +186,9 @@ class SearchSelect extends IgniteElement {
search(text) {
var results = [];
results = results.concat(this.options);
if (this.options) {
results = results.concat(this.options);
}
if (text && text != "" && text != " ") {
var regex = new RegExp(text, 'i');