@widergy/mobile-ui 1.26.3 → 1.26.5
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/CHANGELOG.md +14 -0
- package/lib/components/RadioGroup/components/RadioButton/index.js +1 -1
- package/lib/components/RadioGroup/index.js +5 -5
- package/lib/components/UTLabel/constants.js +5 -5
- package/lib/components/UTSelect/versions/V1/index.js +17 -3
- package/lib/components/UTWorkflowContainer/versions/V0/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.26.5](https://github.com/widergy/mobile-ui/compare/v1.26.4...v1.26.5) (2024-10-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* visual fixes ([#367](https://github.com/widergy/mobile-ui/issues/367)) ([b916b9b](https://github.com/widergy/mobile-ui/commit/b916b9b641c2fbff90b8b5ab2efb8b6b8ae447b6))
|
|
7
|
+
|
|
8
|
+
## [1.26.4](https://github.com/widergy/mobile-ui/compare/v1.26.3...v1.26.4) (2024-10-01)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* utselect options update ([#362](https://github.com/widergy/mobile-ui/issues/362)) ([e6ccae1](https://github.com/widergy/mobile-ui/commit/e6ccae11b2e78183d426ef42af09bf2636a83fc0))
|
|
14
|
+
|
|
1
15
|
## [1.26.3](https://github.com/widergy/mobile-ui/compare/v1.26.2...v1.26.3) (2024-09-30)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -3,7 +3,7 @@ import { ViewPropTypes } from 'deprecated-react-native-prop-types';
|
|
|
3
3
|
import { View } from 'react-native';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import UTLabel from '../UTLabel';
|
|
7
7
|
|
|
8
8
|
import RadioButton from './components/RadioButton';
|
|
9
9
|
import { DEFAULT_KEY_FIELD } from './constants';
|
|
@@ -40,14 +40,14 @@ class RadioGroup extends Component {
|
|
|
40
40
|
return (
|
|
41
41
|
<View style={styles.container}>
|
|
42
42
|
{title && (
|
|
43
|
-
<
|
|
43
|
+
<UTLabel variant="body" {...titleProps}>
|
|
44
44
|
{title}
|
|
45
|
-
</
|
|
45
|
+
</UTLabel>
|
|
46
46
|
)}
|
|
47
47
|
{options.map(this.renderOptions)}
|
|
48
|
-
<
|
|
48
|
+
<UTLabel colorTheme="error" shade="05" variant="body">
|
|
49
49
|
{error}
|
|
50
|
-
</
|
|
50
|
+
</UTLabel>
|
|
51
51
|
</View>
|
|
52
52
|
);
|
|
53
53
|
}
|
|
@@ -38,6 +38,8 @@ const UTSelect = ({
|
|
|
38
38
|
suffix,
|
|
39
39
|
title,
|
|
40
40
|
value,
|
|
41
|
+
onChangeSearchTerm,
|
|
42
|
+
disableFilterOptions,
|
|
41
43
|
withAutoReset
|
|
42
44
|
}) => {
|
|
43
45
|
const [bottomSheetVisible, setBottomSheetVisible] = useState(false);
|
|
@@ -47,6 +49,15 @@ const UTSelect = ({
|
|
|
47
49
|
|
|
48
50
|
const validationData = useMemo(() => error && formatErrorToValidation(error), [error]);
|
|
49
51
|
|
|
52
|
+
const handleOnChangeSearchTerm = newSearchTerm => {
|
|
53
|
+
onChangeSearchTerm?.(newSearchTerm);
|
|
54
|
+
setSearchTerm(newSearchTerm);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
setSortedOptions(options);
|
|
59
|
+
}, [options]);
|
|
60
|
+
|
|
50
61
|
const sortOptions = useCallback(() => {
|
|
51
62
|
const selectedOptionsList = [];
|
|
52
63
|
const unselectedOptionsList = [];
|
|
@@ -99,8 +110,11 @@ const UTSelect = ({
|
|
|
99
110
|
}, [value, options, multiple]);
|
|
100
111
|
|
|
101
112
|
const filteredOptions = useMemo(
|
|
102
|
-
() =>
|
|
103
|
-
|
|
113
|
+
() =>
|
|
114
|
+
disableFilterOptions
|
|
115
|
+
? sortedOptions
|
|
116
|
+
: sortedOptions.filter(option => option.label.toLowerCase().includes(searchTerm.toLowerCase())),
|
|
117
|
+
[sortedOptions, searchTerm, disableFilterOptions]
|
|
104
118
|
);
|
|
105
119
|
|
|
106
120
|
const clearAction = {
|
|
@@ -165,7 +179,7 @@ const UTSelect = ({
|
|
|
165
179
|
>
|
|
166
180
|
<View style={styles.bottomSheetBodyContainer}>
|
|
167
181
|
<UTSearchField
|
|
168
|
-
onChange={
|
|
182
|
+
onChange={handleOnChangeSearchTerm}
|
|
169
183
|
placeholder={searchPlaceholder}
|
|
170
184
|
value={searchTerm}
|
|
171
185
|
variant="gray"
|
package/package.json
CHANGED