fix csv file upload bug
This commit is contained in:
parent
3e465f6df3
commit
1d20a91b6e
4 changed files with 10 additions and 6 deletions
|
|
@ -432,8 +432,12 @@ export default function CodeTabsComponent({
|
||||||
.suffixes
|
.suffixes
|
||||||
}
|
}
|
||||||
onFileChange={(
|
onFileChange={(
|
||||||
k: any
|
value: any
|
||||||
) => {}}
|
) => {
|
||||||
|
t.data.node.template[
|
||||||
|
n
|
||||||
|
].file_path = value;
|
||||||
|
}}
|
||||||
></InputFileComponent>
|
></InputFileComponent>
|
||||||
</div>
|
</div>
|
||||||
</ShadTooltip>
|
</ShadTooltip>
|
||||||
|
|
|
||||||
|
|
@ -66,12 +66,12 @@ export default function InputFileComponent({
|
||||||
const { file_path } = data;
|
const { file_path } = data;
|
||||||
console.log("File name:", file_path);
|
console.log("File name:", file_path);
|
||||||
|
|
||||||
|
// sets the value that goes to the backend
|
||||||
|
onFileChange(file_path);
|
||||||
// Update the state and callback with the name of the file
|
// Update the state and callback with the name of the file
|
||||||
// sets the value to the user
|
// sets the value to the user
|
||||||
setMyValue(file.name);
|
setMyValue(file.name);
|
||||||
onChange(file.name);
|
onChange(file.name);
|
||||||
// sets the value that goes to the backend
|
|
||||||
onFileChange(file_path);
|
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@ const EditNodeModal = forwardRef(
|
||||||
}
|
}
|
||||||
suffixes={myData.node.template[n].suffixes}
|
suffixes={myData.node.template[n].suffixes}
|
||||||
onFileChange={(t: string) => {
|
onFileChange={(t: string) => {
|
||||||
handleOnNewValue(t, n);
|
data.node.template[n].file_path = t;
|
||||||
}}
|
}}
|
||||||
></InputFileComponent>
|
></InputFileComponent>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ export default function ModalField({
|
||||||
fileTypes={data.node.template[name].fileTypes}
|
fileTypes={data.node.template[name].fileTypes}
|
||||||
suffixes={data.node.template[name].suffixes}
|
suffixes={data.node.template[name].suffixes}
|
||||||
onFileChange={(t: string) => {
|
onFileChange={(t: string) => {
|
||||||
data.node.template[name].content = t;
|
data.node.template[name].file_path = t;
|
||||||
}}
|
}}
|
||||||
></InputFileComponent>
|
></InputFileComponent>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue