mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
TablePanel: Refactor to functional component and move add ad hoc filter action to PanelContext (#61360)
* FieldOptions: Add filterable as registry added field item * Refactor to functional component, move ad hoc filter to PanelStateWrapper * review tweaks
This commit is contained in:
@@ -25,6 +25,7 @@ import {
|
||||
StatsPickerConfigSettings,
|
||||
displayNameOverrideProcessor,
|
||||
FieldNamePickerConfigSettings,
|
||||
booleanOverrideProcessor,
|
||||
} from '@grafana/data';
|
||||
import { RadioButtonGroup, TimeZonePicker, Switch } from '@grafana/ui';
|
||||
import { FieldNamePicker } from '@grafana/ui/src/components/MatchersUI/FieldNamePicker';
|
||||
@@ -381,5 +382,18 @@ export const getAllStandardFieldConfigs = () => {
|
||||
getItemsCount: (value) => (value ? value.steps.length : 0),
|
||||
};
|
||||
|
||||
return [unit, min, max, decimals, displayName, color, noValue, links, mappings, thresholds];
|
||||
const filterable: FieldConfigPropertyItem<{}, boolean | undefined, {}> = {
|
||||
id: 'filterable',
|
||||
path: 'filterable',
|
||||
name: 'Ad-hoc filterable',
|
||||
hideFromDefaults: true,
|
||||
editor: standardEditorsRegistry.get('boolean').editor as any,
|
||||
override: standardEditorsRegistry.get('boolean').editor as any,
|
||||
process: booleanOverrideProcessor,
|
||||
shouldApply: () => true,
|
||||
settings: {},
|
||||
category,
|
||||
};
|
||||
|
||||
return [unit, min, max, decimals, displayName, color, noValue, links, mappings, thresholds, filterable];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user