From 18901d21155d8dcad872b35ea84c28dfa510f473 Mon Sep 17 00:00:00 2001 From: MattMo Date: Tue, 24 Oct 2023 18:04:36 -0700 Subject: [PATCH] Fixed a few issues with the search select component. --- search-select.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/search-select.js b/search-select.js index 09471da..6069768 100644 --- a/search-select.js +++ b/search-select.js @@ -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');