diff --git a/app/components/Package/TrendsChart.vue b/app/components/Package/TrendsChart.vue index a62c7ccf2..9339abf76 100644 --- a/app/components/Package/TrendsChart.vue +++ b/app/components/Package/TrendsChart.vue @@ -16,6 +16,7 @@ import type { WeeklyDataPoint, YearlyDataPoint, } from '~/types/chart' +import { DATE_INPUT_MAX } from '~/utils/input' const props = withDefaults( defineProps<{ @@ -1452,6 +1453,7 @@ watch(selectedMetric, value => { v-if="showFacetSelector" id="trends-metric-select" v-model="selectedMetric" + :disabled="activeMetricState.pending" :items="METRICS.map(m => ({ label: m.label, value: m.id }))" :label="$t('package.trends.facet')" /> @@ -1485,8 +1487,8 @@ watch(selectedMetric, value => { @@ -1505,8 +1507,8 @@ watch(selectedMetric, value => { diff --git a/app/utils/input.ts b/app/utils/input.ts index 5b55f3076..204ba4d75 100644 --- a/app/utils/input.ts +++ b/app/utils/input.ts @@ -26,3 +26,5 @@ export function isKeyWithoutModifiers(event: KeyboardEvent, key: string): boolea !event.shiftKey ) } + +export const DATE_INPUT_MAX = '9999-12-31'