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:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user