(nodeData: Record<string, any>, inputType: string, overrideParams?: Record<string, any>, arrayIndex?: number)
| 673 | } |
| 674 | |
| 675 | const showHideInputs = (nodeData: Record<string, any>, inputType: string, overrideParams?: Record<string, any>, arrayIndex?: number) => { |
| 676 | const params = overrideParams ?? nodeData[inputType] ?? [] |
| 677 | |
| 678 | for (let i = 0; i < params.length; i += 1) { |
| 679 | const inputParam = params[i] |
| 680 | |
| 681 | // Reset display flag to false for each inputParam |
| 682 | inputParam.display = true |
| 683 | |
| 684 | if (inputParam.show) { |
| 685 | _showHideOperation(nodeData, inputParam, 'show', arrayIndex) |
| 686 | } |
| 687 | if (inputParam.hide) { |
| 688 | _showHideOperation(nodeData, inputParam, 'hide', arrayIndex) |
| 689 | } |
| 690 | } |
| 691 | |
| 692 | return params |
| 693 | } |
| 694 | |
| 695 | const showHideInputParams = (nodeData: Record<string, any>): InputParam[] => { |
| 696 | return showHideInputs(nodeData, 'inputParams') |
no test coverage detected