mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
10 lines
253 B
TypeScript
10 lines
253 B
TypeScript
|
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);
|
||
|
}
|