code7-leia 0.1.131 → 0.1.133

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,5 +1,5 @@
1
1
  {
2
- "version": "0.1.131",
2
+ "version": "0.1.133",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -43,9 +43,20 @@ export const FileArea = () => {
43
43
  const options = tags.map((tag: any) => {
44
44
  return { label: tag, value: tag }
45
45
  })
46
- setOptionsPresset(options)
46
+ if(options !== optionsPresset){
47
+ setOptionsPresset(options)
48
+ }
47
49
  }, [tags])
48
50
 
51
+ useEffect(() => {
52
+ if(!modal){
53
+ const options = tags.map((tag: any) => {
54
+ return { label: tag, value: tag }
55
+ })
56
+ setOptionsPresset(options)
57
+ }
58
+ }, [modal])
59
+
49
60
  useEffect(() => {
50
61
  if(!!initFiles){
51
62
  setFiles(initFiles)
@@ -83,7 +94,6 @@ export const FileArea = () => {
83
94
  }
84
95
 
85
96
  const handleUploadFile = () => {
86
- console.log('presset: ', presset)
87
97
  dispatch(uploadFilesAction(uploadFile, id, presset, language))
88
98
  setModal(false)
89
99
  setUploadFile(undefined)
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import * as S from './styles';
3
3
 
4
4
  interface Option {
@@ -17,6 +17,10 @@ const MultiSelect: React.FC<MultiSelectProps> = ({ options, presset, setPresset,
17
17
  const [expanded, setExpanded] = useState(false);
18
18
  const [newOption, setNewOption] = useState('');
19
19
 
20
+ useEffect(() => {
21
+ setExpanded(false)
22
+ }, [])
23
+
20
24
  const handleCheckboxChange = (value: string) => {
21
25
  setPresset(prevPresset => {
22
26
  if (prevPresset.includes(value)) {