@bytebrand/fe-ui-core 4.2.38 → 4.2.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core",
3
- "version": "4.2.38",
3
+ "version": "4.2.40",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react';
1
+ import React, { useState, useEffect } from 'react';
2
2
  import { TextField, IconButton } from '@mui/material';
3
3
  import { ThemeProvider } from '@mui/material/styles';
4
4
  import { Theme } from './MaterialField.styled';
@@ -45,6 +45,10 @@ const MaterialField: React.FC<IVehicleModalProps> = ({
45
45
  const [showPassword, setShowPassword] = React.useState(false);
46
46
  const [enteredValue, setEnteredValue] = useState(value);
47
47
 
48
+ useEffect(() => {
49
+ setEnteredValue(value);
50
+ }, [value])
51
+
48
52
  const onHandleChange = (event?: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
49
53
  const value = event.currentTarget.value;
50
54
  const name = event.currentTarget.name;
@@ -751,9 +751,14 @@ const getDecoratedProps = (
751
751
  ? t('vehicleProps:value.co2Combined', { co2: co2.toLocaleString(language) })
752
752
  : t('vehicleProps:value.na');
753
753
 
754
+ const hybridPlugin = car.engineData.hybridPlugin;
755
+
754
756
  return Number.isFinite(consumptionCombined) && Number.isFinite(consumptionPowerCombined)
755
757
  ? <React.Fragment>
756
- {consumptionPowerCombined ? consumptionPowerCombinedContent : ''} {consumptionPowerCombined ? <br /> : ''}{consumptionCombinedContent} <br /> {co2Value}
758
+ {consumptionPowerCombined && hybridPlugin ? consumptionPowerCombinedContent : ''}
759
+ {consumptionPowerCombined && hybridPlugin ? <br /> : ''}
760
+ {consumptionCombinedContent} <br />
761
+ {co2Value}
757
762
  </React.Fragment>
758
763
  : t('vehicleProps:value.na');
759
764
  }