Fix for sidebar searching when there are no sidebar to search (#3010)

* added examples for box shadows

Add some examples for shadows on certain elements/widgets like the cards or tables; mainly to help with color contrasting since the body background has a similar color / tone with the element/widget's background

* Revert "added examples for box shadows"

This reverts commit 3aa62588db.

* Fix sidebar searching

If there are no data-widget: "sidebar-search" found, then stop init()
This commit is contained in:
Ryan
2020-09-21 16:33:44 +08:00
committed by GitHub
parent 2cb8bb72a7
commit 32a760a47d

View File

@@ -61,6 +61,10 @@ class SidebarSearch {
// Public
init() {
if ($(SELECTOR_DATA_WIDGET).length == 0) {
return
}
if ($(SELECTOR_DATA_WIDGET).next(SELECTOR_SEARCH_RESULTS).length == 0) {
$(SELECTOR_DATA_WIDGET).after(
$('<div />', { class: CLASS_NAME_SEARCH_RESULTS })