@bytebrand/fe-ui-core 4.2.113 → 4.2.115
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.
|
|
3
|
+
"version": "4.2.115",
|
|
4
4
|
"description": "UI components for the auto.de project",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"module": "dist/common.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@babel/preset-react": "^7.18.6",
|
|
15
15
|
"@babel/preset-typescript": "^7.21.0",
|
|
16
16
|
"@bytebrand/car-schema-selectors": "^2.0.7",
|
|
17
|
-
"@bytebrand/fe-histoslider": "^2.1.
|
|
17
|
+
"@bytebrand/fe-histoslider": "^2.1.6",
|
|
18
18
|
"@bytebrand/i18n-dictionaries": "^0.7.5",
|
|
19
19
|
"@date-io/date-fns": "1.3.13",
|
|
20
20
|
"@emotion/react": "^11.9.3",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"react": "^17.0.2",
|
|
54
54
|
"react-device-detect": "^2.1.2",
|
|
55
55
|
"react-dom": "^17.0.2",
|
|
56
|
-
"react-grid-system": "^
|
|
56
|
+
"react-grid-system": "^5.0.2",
|
|
57
57
|
"react-i18next": "9.0.4",
|
|
58
58
|
"react-lazyload": "3.2.0",
|
|
59
59
|
"react-scroll": "^1.7.13",
|
|
@@ -2,7 +2,7 @@ import React, { memo } from 'react';
|
|
|
2
2
|
import Slider from '../../_common/Slider/Slider';
|
|
3
3
|
import MaterialAutocomplete from '../../_common/MaterialAutocomplete/MaterialAutocomplete';
|
|
4
4
|
import styles from './commonFilters.styl';
|
|
5
|
-
import { isEqual } from 'lodash';
|
|
5
|
+
import { isEqual, isNil } from 'lodash';
|
|
6
6
|
import { RadioGroup } from '@mui/material';
|
|
7
7
|
import CheckboxMaterial from '../../_common/CheckboxMaterial/CheckboxMaterial';
|
|
8
8
|
import { POWER_FIX } from '../../../framework/constants/Search';
|
|
@@ -40,7 +40,9 @@ class Power extends React.Component<IPowerProps, ITypeState> {
|
|
|
40
40
|
const { from, to }: any = { ...controls, [name]: value };
|
|
41
41
|
const controlsObj = { from, to, type };
|
|
42
42
|
this.tempValues = { from, to };
|
|
43
|
-
|
|
43
|
+
if ((controlsObj.from === '' && controlsObj.to === '') || (!controlsObj.to && !controlsObj.from)) {
|
|
44
|
+
controlsObj.type = null;
|
|
45
|
+
}
|
|
44
46
|
onChangeControls(this.name, controlsObj);
|
|
45
47
|
onChange(this.name, controlsObj);
|
|
46
48
|
};
|
|
@@ -52,9 +54,11 @@ class Power extends React.Component<IPowerProps, ITypeState> {
|
|
|
52
54
|
this.setState(() => ({
|
|
53
55
|
type: value
|
|
54
56
|
}));
|
|
55
|
-
if (values.from
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
if (!isNil(values.from) && !isNil(values.to)) {
|
|
58
|
+
if (values.from !== '' || values.to !== '') {
|
|
59
|
+
onChangeControls(this.name, { ...values, type: value });
|
|
60
|
+
onChange(this.name, { ...values, type: value });
|
|
61
|
+
}
|
|
58
62
|
}
|
|
59
63
|
};
|
|
60
64
|
|
|
@@ -127,7 +131,7 @@ class Power extends React.Component<IPowerProps, ITypeState> {
|
|
|
127
131
|
|
|
128
132
|
const fromProps = {
|
|
129
133
|
...commonProps,
|
|
130
|
-
value: `${from}` || null,
|
|
134
|
+
value: (from !== 0 ? `${from}` :0) || null,
|
|
131
135
|
label: this.getLabel('filters.from', type),
|
|
132
136
|
type: 'number',
|
|
133
137
|
onChange: (value: any) => this.onDropDownChange('from', value),
|
|
@@ -136,7 +140,7 @@ class Power extends React.Component<IPowerProps, ITypeState> {
|
|
|
136
140
|
|
|
137
141
|
const toProps = {
|
|
138
142
|
...commonProps,
|
|
139
|
-
value: `${to}` || null,
|
|
143
|
+
value: (to !== 0 ? `${to}` :0) || null,
|
|
140
144
|
type: 'number',
|
|
141
145
|
label: this.getLabel('filters.to', type),
|
|
142
146
|
onChange: (value: any) => this.onDropDownChange('to', value),
|