refactor(App): improve vertical sidebar styling and dropdown behavior for enhanced user experience
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m53s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m53s
This commit is contained in:
@@ -147,10 +147,12 @@ function MainLayout() {
|
||||
tools: false
|
||||
});
|
||||
|
||||
// Закрытие всех выпадающих меню при клике вне их области
|
||||
// Закрытие выпадающих меню только при клике в сайдбаре вне открытого меню (клики по странице не закрывают)
|
||||
useEffect(() => {
|
||||
const handleClickOutside = (event) => {
|
||||
if (!event.target.closest('.nav-item.dropdown')) {
|
||||
const inSidebar = event.target.closest('.navbar-vertical');
|
||||
const inDropdown = event.target.closest('.nav-item.dropdown');
|
||||
if (inSidebar && !inDropdown) {
|
||||
setDropdownStates({
|
||||
data: false,
|
||||
management: false,
|
||||
|
||||
Reference in New Issue
Block a user