UI: Remove percent from label for n/a value

This commit is contained in:
Artem Dzhereleiko 2023-12-13 14:58:11 +02:00
parent cd0d2d4212
commit db411ac7e6

View File

@ -418,7 +418,7 @@ export const createAbsoluteLayout = (values?: {inputValue: number | string; volu
export const createPercentLayout = (value: number | string = 50, valueTextStyle: string = valueTextStyleDefaults): string => export const createPercentLayout = (value: number | string = 50, valueTextStyle: string = valueTextStyleDefaults): string =>
`<div xmlns="http://www.w3.org/1999/xhtml" style="${valueContainerStyleDefaults}"> `<div xmlns="http://www.w3.org/1999/xhtml" style="${valueContainerStyleDefaults}">
<label style="${valueTextStyle}">${value} ${CapacityUnits.percent}</label> <label style="${valueTextStyle}">${value} ${value !== 'N/A' ? CapacityUnits.percent : ''}</label>
</div>`; </div>`;
export const optionsFilter = (searchText: string): ((key: DataKey) => boolean) => export const optionsFilter = (searchText: string): ((key: DataKey) => boolean) =>