Fix map positioning when search bar is present
All checks were successful
Build Docker Image / build (push) Successful in 5m13s

Use dynamic mapTopClass/mapHeightClass based on searchBar slot:
- With searchBar: top-44 (176px), height calc(100vh-12rem)
- Without searchBar: top-32 (128px), height calc(100vh-9rem)
This commit is contained in:
Ruslan Bakiev
2026-01-14 12:50:57 +07:00
parent 134b8a5eb4
commit 7bd5000dc4

View File

@@ -213,9 +213,11 @@ const props = withDefaults(defineProps<{
totalCount: 0 totalCount: 0
}) })
// Map positioning - unified height for all pages with map // Map positioning - dynamic based on search bar presence
const mapTopClass = 'top-32' const slots = useSlots()
const mapHeightClass = 'h-[calc(100vh-9rem)]' const hasSearchBar = computed(() => !!slots.searchBar)
const mapTopClass = computed(() => hasSearchBar.value ? 'top-44' : 'top-32')
const mapHeightClass = computed(() => hasSearchBar.value ? 'h-[calc(100vh-12rem)]' : 'h-[calc(100vh-9rem)]')
const emit = defineEmits<{ const emit = defineEmits<{
'select': [item: MapItem] 'select': [item: MapItem]