mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Bump Scenes to 5.42.0 (#100205)
* update scenes and weekStart prop type * update test * adjust weekStart type in schemaV2 * clean up weekStart error message * clean up weekStart in test data
This commit is contained in:
@@ -467,7 +467,7 @@ TimeSettingsSpec: {
|
||||
// Whether timepicker is visible or not.
|
||||
hideTimepicker: bool // v1: timepicker.hidden
|
||||
// Day when the week starts. Expressed by the name of the day in lowercase, e.g. "monday".
|
||||
weekStart: string
|
||||
weekStart?: "saturday" | "monday" | "sunday"
|
||||
// The month that the fiscal year starts on. 0 = January, 11 = December
|
||||
fiscalYearStartMonth: int
|
||||
// Override the now time by entering a time delay. Use this option to accommodate known delays in data aggregation to avoid null values.
|
||||
|
@@ -644,7 +644,7 @@ export interface TimeSettingsSpec {
|
||||
// v1: timepicker.hidden
|
||||
hideTimepicker: boolean;
|
||||
// Day when the week starts. Expressed by the name of the day in lowercase, e.g. "monday".
|
||||
weekStart: string;
|
||||
weekStart?: "saturday" | "monday" | "sunday";
|
||||
// The month that the fiscal year starts on. 0 = January, 11 = December
|
||||
fiscalYearStartMonth: number;
|
||||
// Override the now time by entering a time delay. Use this option to accommodate known delays in data aggregation to avoid null values.
|
||||
@@ -681,7 +681,6 @@ export const defaultTimeSettingsSpec = (): TimeSettingsSpec => ({
|
||||
"30d",
|
||||
],
|
||||
hideTimepicker: false,
|
||||
weekStart: "",
|
||||
fiscalYearStartMonth: 0,
|
||||
});
|
||||
|
||||
|
@@ -7,7 +7,7 @@ import { Combobox } from '../Combobox/Combobox';
|
||||
import { ComboboxOption } from '../Combobox/types';
|
||||
|
||||
export interface Props {
|
||||
onChange: (weekStart: string) => void;
|
||||
onChange: (weekStart: WeekStart) => void;
|
||||
value: string;
|
||||
width?: number;
|
||||
autoFocus?: boolean;
|
||||
@@ -57,7 +57,7 @@ export const WeekStartPicker = (props: Props) => {
|
||||
const onChangeWeekStart = useCallback(
|
||||
(selectable: ComboboxOption | null) => {
|
||||
if (selectable && selectable.value !== undefined) {
|
||||
onChange(selectable.value);
|
||||
onChange(selectable.value as WeekStart);
|
||||
}
|
||||
},
|
||||
[onChange]
|
||||
|
Reference in New Issue
Block a user