feat(PowerInput/Suggestions): hide steps without execution steps
This commit is contained in:
@@ -114,7 +114,7 @@ const Suggestions = (props: SuggestionsProps) => {
|
|||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{listLength === undefined && (
|
{listLength === Infinity && (
|
||||||
<Button
|
<Button
|
||||||
fullWidth
|
fullWidth
|
||||||
onClick={collapseList}
|
onClick={collapseList}
|
||||||
|
@@ -35,10 +35,16 @@ const process = (data: any, parentKey?: any, index?: number): any[] => {
|
|||||||
export const processStepWithExecutions = (steps: IStep[]): any[] => {
|
export const processStepWithExecutions = (steps: IStep[]): any[] => {
|
||||||
if (!steps) return [];
|
if (!steps) return [];
|
||||||
|
|
||||||
return steps.map((step: IStep, index: number) => ({
|
return steps
|
||||||
id: step.id,
|
.filter((step: IStep) => {
|
||||||
// TODO: replace with step.name once introduced
|
const hasExecutionSteps = !!step.executionSteps?.length;
|
||||||
name: `${index + 1}. ${step.appKey?.charAt(0)?.toUpperCase() + step.appKey?.slice(1)}`,
|
|
||||||
output: process(step.executionSteps?.[0]?.dataOut || {}, `step.${step.id}`),
|
return hasExecutionSteps
|
||||||
}));
|
})
|
||||||
|
.map((step: IStep, index: number) => ({
|
||||||
|
id: step.id,
|
||||||
|
// TODO: replace with step.name once introduced
|
||||||
|
name: `${index + 1}. ${step.appKey?.charAt(0)?.toUpperCase() + step.appKey?.slice(1)}`,
|
||||||
|
output: process(step.executionSteps?.[0]?.dataOut || {}, `step.${step.id}`),
|
||||||
|
}));
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user