Add filter by map bounds checkbox to SelectionPanel
All checks were successful
Build Docker Image / build (push) Successful in 3m36s
All checks were successful
Build Docker Image / build (push) Successful in 3m36s
- Remove map search input (was wrong implementation) - Add checkbox "In map area" to filter list by visible map bounds - Filter products/hubs/suppliers when checkbox is enabled - Disable "load more" when filtering by bounds (client-side only)
This commit is contained in:
@@ -14,6 +14,17 @@
|
||||
:placeholder="searchPlaceholder"
|
||||
class="input input-sm w-full bg-white/50 border-base-300/50 text-base-content placeholder:text-base-content/50"
|
||||
/>
|
||||
<!-- Filter by map bounds checkbox -->
|
||||
<label class="flex items-center gap-2 mt-2 text-sm cursor-pointer text-base-content/80 hover:text-base-content">
|
||||
<input
|
||||
type="checkbox"
|
||||
:checked="filterByBounds"
|
||||
class="checkbox checkbox-sm checkbox-primary"
|
||||
@change="emit('update:filter-by-bounds', ($event.target as HTMLInputElement).checked)"
|
||||
/>
|
||||
<Icon name="lucide:map" size="14" />
|
||||
<span>{{ $t('catalog.search.filterByMap') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- List -->
|
||||
@@ -96,12 +107,14 @@ const props = defineProps<{
|
||||
loading?: boolean
|
||||
loadingMore?: boolean
|
||||
hasMore?: boolean
|
||||
filterByBounds?: boolean
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
'select': [type: string, item: Item]
|
||||
'close': []
|
||||
'load-more': []
|
||||
'update:filter-by-bounds': [value: boolean]
|
||||
}>()
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
Reference in New Issue
Block a user