Fixed the action parameter bug
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user