diff --git a/src/components/policy-editor/ActionRowScript.jsx b/src/components/policy-editor/ActionRowScript.jsx index 09b8de5d..afd24124 100644 --- a/src/components/policy-editor/ActionRowScript.jsx +++ b/src/components/policy-editor/ActionRowScript.jsx @@ -3,14 +3,14 @@ import Row from "react-bootstrap/Row"; import { OptionalFieldNoLabel } from "../../forms/OptionalFieldNoLabel"; import { LabelColumn } from "./LabelColumn"; import { WideValueColumn } from "./WideValueColumn"; -import { EffectiveValue } from "./EffectiveValue"; +import { EffectiveActionValue } from "./EffectiveActionValue"; export function ActionRowScript(component, action, name, help) { return ( {OptionalFieldNoLabel(component, "", "policy." + action, {})} - {EffectiveValue(component, action)} + {EffectiveActionValue(component, action)} ); } diff --git a/src/components/policy-editor/EffectiveActionValue.jsx b/src/components/policy-editor/EffectiveActionValue.jsx new file mode 100644 index 00000000..39da8bca --- /dev/null +++ b/src/components/policy-editor/EffectiveActionValue.jsx @@ -0,0 +1,24 @@ +import React from "react"; +import Form from "react-bootstrap/Form"; +import { getDeepStateProperty } from "../../utils/deepstate"; +import { EffectiveValueColumn } from "./EffectiveValueColumn"; + +export function EffectiveActionValue(component, policyField) { + const dsp = getDeepStateProperty(component, "resolved.definition." + policyField, undefined); + + return ( + + + + {component.PolicyDefinitionPoint(dsp)} + + + ); +} diff --git a/src/forms/OptionalFieldNoLabel.jsx b/src/forms/OptionalFieldNoLabel.jsx index 49d1db2f..56ad0c96 100644 --- a/src/forms/OptionalFieldNoLabel.jsx +++ b/src/forms/OptionalFieldNoLabel.jsx @@ -13,6 +13,8 @@ export function OptionalFieldNoLabel(component, label, name, props = {}, helpTex value={stateProperty(component, name)} data-testid={"control-" + name} onChange={component.handleChange} + as="textarea" + rows="5" {...props} /> {helpText && {helpText}}