FieldOptions: Revert scalable unit option as we already support this via custom prefix/suffixes (#81893)

* StandardFieldOptions: Revert scalable unit option

* forgot to save merge fixes
This commit is contained in:
Torkel Ödegaard
2024-02-05 16:42:22 +01:00
committed by GitHub
parent b02f0b926a
commit 1fe32ce36e
10 changed files with 122 additions and 212 deletions

View File

@@ -247,22 +247,7 @@ export const getAllStandardFieldConfigs = () => {
category,
};
const unitScale: FieldConfigPropertyItem<unknown, boolean, BooleanFieldSettings> = {
id: 'unitScale',
path: 'unitScale',
name: 'Scale units',
description: 'Automatically scale units relative to magnitude of the value',
editor: standardEditorsRegistry.get('boolean').editor,
override: standardEditorsRegistry.get('boolean').editor,
process: booleanOverrideProcessor,
defaultValue: true,
shouldApply: () => true,
category,
};
const fieldMinMax: FieldConfigPropertyItem<{ min: number; max: number }, boolean, BooleanFieldSettings> = {
const fieldMinMax: FieldConfigPropertyItem<any, boolean, BooleanFieldSettings> = {
id: 'fieldMinMax',
path: 'fieldMinMax',
name: 'Field min/max',
@@ -431,19 +416,5 @@ export const getAllStandardFieldConfigs = () => {
category,
};
return [
unit,
unitScale,
min,
max,
fieldMinMax,
decimals,
displayName,
color,
noValue,
links,
mappings,
thresholds,
filterable,
];
return [unit, min, max, fieldMinMax, decimals, displayName, color, noValue, links, mappings, thresholds, filterable];
};