Files
grafana/public/app/features/dashboard/state/selectors.ts
T

10 lines
253 B
TypeScript
Raw Normal View History

import { DashboardState, PanelState } from 'app/types';
export function getPanelStateById(state: DashboardState, panelId: number): PanelState {
if (!panelId) {
return {} as PanelState;
}
return state.panels[panelId] ?? ({} as PanelState);
}