PanelEdit: Fixes showIf for panel level options, fixes configRev when switching panels (#33173)
This commit is contained in:
@@ -41,6 +41,10 @@ export function getVizualizationOptions(props: OptionPaneRenderProps): OptionsPa
|
|||||||
* Panel options
|
* Panel options
|
||||||
*/
|
*/
|
||||||
for (const pluginOption of plugin.optionEditors.list()) {
|
for (const pluginOption of plugin.optionEditors.list()) {
|
||||||
|
if (pluginOption.showIf && !pluginOption.showIf(currentOptions, data?.series)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
const category = getOptionsPaneCategory(pluginOption.category);
|
const category = getOptionsPaneCategory(pluginOption.category);
|
||||||
const Editor = pluginOption.editor;
|
const Editor = pluginOption.editor;
|
||||||
|
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ const mustKeepProps: { [str: string]: boolean } = {
|
|||||||
replaceVariables: true,
|
replaceVariables: true,
|
||||||
libraryPanel: true,
|
libraryPanel: true,
|
||||||
getDisplayTitle: true,
|
getDisplayTitle: true,
|
||||||
|
configRev: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const defaults: any = {
|
const defaults: any = {
|
||||||
|
|||||||
Reference in New Issue
Block a user