mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* initial POC * fix import * field config editor in the sidebar * field config editor in the sidebar * field config editor in the sidebar * sidebar * include threshold in sidebar * include threshold in sidebar * include threshold in sidebar * init to empty threshold * merge * Make sure editor is fully rendered when page is refreshed * use scrollbars * add matcher UI folder * remove * Field options basic editors * Removed deebugger * Make number field editor controlled * Update public/app/features/dashboard/state/PanelModel.ts * Update public/app/plugins/panel/gauge/GaugePanel.tsx * Ready for production Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
28 lines
726 B
TypeScript
28 lines
726 B
TypeScript
import { FieldPropertyEditorItem, Registry, FieldConfigEditorRegistry } from '@grafana/data';
|
|
import {
|
|
NumberValueEditor,
|
|
NumberOverrideEditor,
|
|
numberOverrideProcessor,
|
|
NumberFieldConfigSettings,
|
|
} from '@grafana/ui';
|
|
|
|
const columWidth: FieldPropertyEditorItem<number, NumberFieldConfigSettings> = {
|
|
id: 'width', // Match field properties
|
|
name: 'Column Width',
|
|
description: 'column width (for table)',
|
|
|
|
editor: NumberValueEditor,
|
|
override: NumberOverrideEditor,
|
|
process: numberOverrideProcessor,
|
|
|
|
settings: {
|
|
placeholder: 'auto',
|
|
min: 20,
|
|
max: 300,
|
|
},
|
|
};
|
|
|
|
export const tableFieldRegistry: FieldConfigEditorRegistry = new Registry<FieldPropertyEditorItem>(() => {
|
|
return [columWidth];
|
|
});
|