mirror of https://github.com/ColorlibHQ/AdminLTE
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()
pull/3040/head
parent
2cb8bb72a7
commit
32a760a47d
|
@ -61,6 +61,10 @@ class SidebarSearch {
|
||||||
// Public
|
// Public
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
if ($(SELECTOR_DATA_WIDGET).length == 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if ($(SELECTOR_DATA_WIDGET).next(SELECTOR_SEARCH_RESULTS).length == 0) {
|
if ($(SELECTOR_DATA_WIDGET).next(SELECTOR_SEARCH_RESULTS).length == 0) {
|
||||||
$(SELECTOR_DATA_WIDGET).after(
|
$(SELECTOR_DATA_WIDGET).after(
|
||||||
$('<div />', { class: CLASS_NAME_SEARCH_RESULTS })
|
$('<div />', { class: CLASS_NAME_SEARCH_RESULTS })
|
||||||
|
|
Loading…
Reference in New Issue