You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overwriting component.conditional with {"json": {}} may differ from previous {} semantics. Validate that all component visibility logic is truly neutralized across component types and that formio.js treats an empty json conditional as no-op without warnings.
useEffect(()=>{constdata=_.cloneDeep(form);constmanipulatedKeys=[];Utils.eachComponent(data.components,(component)=>{// remove display (show/hide) conditions for showing the component in taskvariable modal/* --------------------------- ------------------ --------------------------- */component.conditional={"json": {}};component.customConditional="";component.logic=[];component.hidden=false;component.hideLabel=false;
Switching <Form form={...}> to <Form src={...}> changes how the library expects input (URL/src vs inline schema). Confirm updatedForm is a valid value for src in the new formio-react version, or ensure it’s transformed to the expected type to avoid runtime fetch attempts or render failures.
<Form src={form} submission={...} url={...}> may conflict if src triggers its own data loading. Verify the new component’s precedence rules between src, submission, and url to prevent double-loading or ignored props.
Passing a form object to src will trigger a remote fetch and likely fail when updatedForm is not a URL. Use the form prop for inline schema to ensure proper rendering.
Why: The snippet corresponds to lines 230–235 where src={updatedForm} replaced form={updatedForm}; if updatedForm is a schema object (as implied), using form prevents erroneous fetching and ensures correct rendering, making this a high-impact fix.
Medium
Correct inline form usage
src expects a URL; providing a form object will cause loading errors and ignore submission. Switch to the form prop for local schemas to keep submission and options working correctly.
Why: The existing_code maps to lines 79–86 with src={form}; if form is a local schema, form prop is the correct usage to avoid src fetch behavior and maintain submission handling, representing a substantial functional correction.
Medium
Fix conditional initialization
Initializing conditional with an empty json object can break condition evaluation expecting a string or a properly shaped object. Use an empty string to disable custom JSON logic while preserving structure for the upgraded API.
Why: The existing_code matches line 69 in the new hunk, and suggesting { json: "" } could better align with APIs expecting a string; however, without full API context it’s a cautious correctness/readability improvement rather than critical.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Issue Tracking
JIRA: https://aottech.atlassian.net/browse/FWF-4762
Issue Type: FEATURE
Changes
PR Type
Enhancement, Bug fix
Description
Switch Form prop from
formtosrcNormalize component conditional to
{"json": {}}Add outline-primary button border override
Point formio-react to scoped npm alias
Diagram Walkthrough
flowchart LR reactForms["React form usages"] -- "prop change form -> src" --> apiUpdate["Align with new formio-react API"] components["Component preprocessing"] -- "conditional set to {\"json\": {}}" --> modalFix["Task variable modal rendering"] styling["SCSS buttons"] -- "outline-primary border added" --> uiPolish["Visual consistency"] packages["package.json"] -- "alias @aot-technologies/formio-react to npm:@leodube/formio-react@1.0.5" --> depRedirect["Dependency source update"]File Walkthrough
5 files
Update Form API usage and conditional schemaUse src prop for Form preview componentSwitch Form to src prop in task viewReplace Form form prop with src in viewerAdd border style for outline-primary buttons3 files
Redirect formio-react dependency to npm aliasUpdate formio-react alias and adjust react-bootstrap depsPoint formio-react to npm alias provider