mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Air accidents (#1584) is not merged, so comments, the changelog fragment and CURRENT-STATE no longer explain the shipwrecks markers, card and picker by it; the row-range test fixture is the shipwrecks row. CURRENT-STATE now says the markers are one billboard collection and the period is stored swapped.
41 lines
1.3 KiB
Vue
41 lines
1.3 KiB
Vue
<script setup>
|
|
// A row's start and end pickers on one line (e.g. the Shipwrecks period).
|
|
// Both ends share one option list; `onSelect` reports which end moved
|
|
// ('from' or 'to') and the chosen option value.
|
|
defineProps({
|
|
range: { type: Object, required: true },
|
|
onSelect: { type: Function, default: () => {} },
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<div class="data-toggle-range" :data-range-id="range.id"
|
|
><div class="data-toggle-slider-head"
|
|
><span class="data-toggle-slider-label">{{ range.label }}</span
|
|
><span class="data-toggle-slider-value gev-slider-value">{{
|
|
range.valueText
|
|
}}</span></div
|
|
><div class="data-toggle-range-ends"
|
|
><label
|
|
v-for="end in ['from', 'to']"
|
|
:key="end"
|
|
class="data-toggle-range-end"
|
|
><span class="data-toggle-range-caption">{{ range[end].label }}</span
|
|
><select
|
|
class="data-toggle-range-select"
|
|
:data-range-end="end"
|
|
:aria-label="range[end].ariaLabel || undefined"
|
|
:value="String(range[end].value)"
|
|
@change="onSelect(end, $event.target.value)"
|
|
><option
|
|
v-for="option in range.options"
|
|
:key="option.value"
|
|
:value="String(option.value)"
|
|
>{{ option.label }}</option
|
|
></select
|
|
></label
|
|
></div
|
|
></div
|
|
>
|
|
</template>
|