Fixed the action parameter bug

This commit is contained in:
monilprajapati
2024-05-30 00:46:58 +05:30
parent 5964f914b9
commit 3600502f94
2 changed files with 7 additions and 6 deletions
+6 -6
View File
@@ -381,13 +381,12 @@ const ParsedAction = (props) => {
useEffect(() => {
if (selectedActionParameters !== undefined && selectedActionParameters !== null && selectedActionParameters.length === 0
if (selectedActionParameters !== undefined && selectedActionParameters !== null
) {
if (selectedAction.parameters !== undefined && selectedAction.parameters !== null && selectedAction.parameters.length > 0) {
setSelectedActionParameters(selectedAction.parameters);
}
}
if ((selectedVariableParameter === null || selectedVariableParameter === undefined) && workflow.workflow_variables !== null && workflow.workflow_variables.length > 0) {
// FIXME - this is the bad thing
@@ -613,7 +612,8 @@ const ParsedAction = (props) => {
setActionlist(actionlist);
}
}
});
},
[selectedAction, selectedVariableParameter, workflowExecutions, listCache]);
const calculateHelpertext = (input_data) => {
@@ -1307,6 +1307,8 @@ const ParsedAction = (props) => {
const selectedAppIcon = selectedAction.large_image
console.log("Selected action: ", selectedAction)
console.log("Selected action paramaters: ", selectedAction.parameters)
var baselabel = selectedAction.label
return (
<div style={appApiViewStyle} id="parsed_action_view">
@@ -2075,7 +2077,6 @@ const ParsedAction = (props) => {
</Select>
</div>
) : null}
{workflow.execution_variables !== undefined &&
workflow.execution_variables !== null &&
workflow.execution_variables.length > 0 ? (
@@ -2395,7 +2396,6 @@ const ParsedAction = (props) => {
})}
</Select>
: null*/}
<div
style={{
marginTop: "10px",
@@ -2776,7 +2776,7 @@ const ParsedAction = (props) => {
placeholder = data.example;
if (data.name === "url" && data.value !== undefined && data.value !== null && data.value.length === 0) {
if (data.name === "url" && data.value !== undefined && data.value !== null && data.value.length > 0) {
data.value = data.example;
}
// In case of data.example