Table: Fixes issue with fixed min and auto max with bar gauge cell (#31316)
This commit is contained in:
@@ -65,14 +65,20 @@ function getMinMaxAndDelta(field: Field): NumericRange {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
export function getFieldConfigWithMinMax(field: Field, local?: boolean): FieldConfig {
|
export function getFieldConfigWithMinMax(field: Field, local?: boolean): FieldConfig {
|
||||||
const { config } = field;
|
const { config } = field;
|
||||||
let { min, max } = config;
|
let { min, max } = config;
|
||||||
if (isNumber(min) && !isNumber(max)) {
|
|
||||||
return config; // noop
|
if (isNumber(min) && isNumber(max)) {
|
||||||
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (local || !field.state?.range) {
|
if (local || !field.state?.range) {
|
||||||
return { ...config, ...getMinMaxAndDelta(field) };
|
return { ...config, ...getMinMaxAndDelta(field) };
|
||||||
}
|
}
|
||||||
|
|
||||||
return { ...config, ...field.state.range };
|
return { ...config, ...field.state.range };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user