mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
PanelEdit: Fixes issue with repeat options (#96260)
This commit is contained in:
parent
7090fd5b34
commit
8a1bbe7517
@ -25,7 +25,13 @@ interface Props {
|
||||
export const PanelOptions = React.memo<Props>(({ panel, searchQuery, listMode, data }) => {
|
||||
const { options, fieldConfig, _pluginInstanceState } = panel.useState();
|
||||
|
||||
const panelFrameOptions = useMemo(() => getPanelFrameCategory2(panel), [panel]);
|
||||
const layoutElement = panel.parent!;
|
||||
const layoutElementState = layoutElement.useState();
|
||||
|
||||
const panelFrameOptions = useMemo(
|
||||
() => getPanelFrameCategory2(panel, layoutElementState),
|
||||
[panel, layoutElementState]
|
||||
);
|
||||
|
||||
const visualizationOptions = useMemo(() => {
|
||||
const plugin = panel.getPlugin();
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { SelectableValue } from '@grafana/data';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
import { config } from '@grafana/runtime';
|
||||
import { SceneTimeRangeLike, VizPanel } from '@grafana/scenes';
|
||||
import { SceneObjectState, SceneTimeRangeLike, VizPanel } from '@grafana/scenes';
|
||||
import { DataLinksInlineEditor, Input, TextArea, Switch, RadioButtonGroup, Select } from '@grafana/ui';
|
||||
import { GenAIPanelDescriptionButton } from 'app/features/dashboard/components/GenAI/GenAIPanelDescriptionButton';
|
||||
import { GenAIPanelTitleButton } from 'app/features/dashboard/components/GenAI/GenAIPanelTitleButton';
|
||||
@ -17,7 +17,10 @@ import { vizPanelToPanel, transformSceneToSaveModel } from '../serialization/tra
|
||||
import { dashboardSceneGraph } from '../utils/dashboardSceneGraph';
|
||||
import { getDashboardSceneFor } from '../utils/utils';
|
||||
|
||||
export function getPanelFrameCategory2(panel: VizPanel): OptionsPaneCategoryDescriptor {
|
||||
export function getPanelFrameCategory2(
|
||||
panel: VizPanel,
|
||||
layoutElementState: SceneObjectState
|
||||
): OptionsPaneCategoryDescriptor {
|
||||
const descriptor = new OptionsPaneCategoryDescriptor({
|
||||
title: 'Panel options',
|
||||
id: 'Panel options',
|
||||
|
Loading…
Reference in New Issue
Block a user