@axinom/mosaic-ui 0.34.0-rc.12 → 0.34.0-rc.13
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": "@axinom/mosaic-ui",
|
|
3
|
-
"version": "0.34.0-rc.
|
|
3
|
+
"version": "0.34.0-rc.13",
|
|
4
4
|
"description": "UI components for building Axinom Mosaic applications",
|
|
5
5
|
"author": "Axinom",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"build-storybook": "storybook build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@axinom/mosaic-core": "^0.4.7-rc.
|
|
35
|
+
"@axinom/mosaic-core": "^0.4.7-rc.13",
|
|
36
36
|
"@faker-js/faker": "^7.4.0",
|
|
37
37
|
"@popperjs/core": "^2.9.2",
|
|
38
38
|
"clsx": "^1.1.0",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"publishConfig": {
|
|
103
103
|
"access": "public"
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "cb762a21a7170650f70855ea7a0f2a88949fd5d4"
|
|
106
106
|
}
|
|
@@ -70,7 +70,7 @@ describe('CustomTags', () => {
|
|
|
70
70
|
|
|
71
71
|
it('displays a tag for each currently selected tag', () => {
|
|
72
72
|
const mockCurrentTags = ['1', '2', '3'];
|
|
73
|
-
const wrapper =
|
|
73
|
+
const wrapper = mount(
|
|
74
74
|
<CustomTags name={'test-name'} value={mockCurrentTags} />,
|
|
75
75
|
);
|
|
76
76
|
|
|
@@ -361,7 +361,7 @@ describe('CustomTags', () => {
|
|
|
361
361
|
const onChangeSpy = jest.fn();
|
|
362
362
|
const mockCurrentTags = ['1', '2', '3'];
|
|
363
363
|
const mockTag = '';
|
|
364
|
-
const wrapper =
|
|
364
|
+
const wrapper = mount(
|
|
365
365
|
<CustomTags
|
|
366
366
|
name={'test-name'}
|
|
367
367
|
onChange={onChangeSpy}
|
|
@@ -394,7 +394,7 @@ describe('CustomTags', () => {
|
|
|
394
394
|
const onChangeSpy = jest.fn();
|
|
395
395
|
const mockCurrentTags = ['1', '2', '3'];
|
|
396
396
|
const mockTag = '2';
|
|
397
|
-
const wrapper =
|
|
397
|
+
const wrapper = mount(
|
|
398
398
|
<CustomTags
|
|
399
399
|
name={'test-name'}
|
|
400
400
|
onChange={onChangeSpy}
|
|
@@ -56,7 +56,7 @@ export const CustomTags: React.FC<CustomTagsProps> = ({
|
|
|
56
56
|
id,
|
|
57
57
|
name,
|
|
58
58
|
type = 'text',
|
|
59
|
-
value
|
|
59
|
+
value,
|
|
60
60
|
disabled = false,
|
|
61
61
|
placeholder,
|
|
62
62
|
error = undefined,
|
|
@@ -70,12 +70,12 @@ export const CustomTags: React.FC<CustomTagsProps> = ({
|
|
|
70
70
|
className = '',
|
|
71
71
|
...rest
|
|
72
72
|
}) => {
|
|
73
|
-
const [currentTags, setCurrentTags] = useState<string[]>(
|
|
73
|
+
const [currentTags, setCurrentTags] = useState<string[]>([]); // Current tags the user has selected
|
|
74
74
|
const [shouldAnimate, setShouldAnimate] = useState<boolean>(false);
|
|
75
75
|
const ref = useRef<FormEvent<HTMLInputElement>>();
|
|
76
76
|
|
|
77
77
|
useEffect(() => {
|
|
78
|
-
setCurrentTags(
|
|
78
|
+
setCurrentTags(value ?? []);
|
|
79
79
|
}, [value]);
|
|
80
80
|
|
|
81
81
|
const styles = {
|