Uploaded image for project: 'CFA MX '
  1. CFA MX
  2. CFAMX-23263

MxNext - Reset Form Issue when using Angular Components

    Details

    • Type: Sprint Defect
    • Status: Done (View Workflow)
    • Priority: Major
    • Resolution: Completed
    • Affects Version/s: CFA 2023R1
    • Fix Version/s: None
    • Component/s: Deposits
    • Labels:
      None
    • SCRUM Team:
      Brotherhood of Mutants
    • Sprint:
      2023.R2 New Features Sprint 2

      Description

      Issue:  The form doesn't reset when components are used.

       

      When you call the "FormGroup.reset()" function, it does reset the values in memory, but the UI component does not change.

      The patch I coded to resolve this can be found in PR:  https://bitbucket.org/CFAInform/inform/pull-requests/6558

      Follow the "ResetForm()" function in "deposited-received-base.component.ts" and the changes in "currency-input.component.ts"

      Basically, I create a subject and pass the reference to the observable to the component.  Then, in the "ResetForm()" function I trigger the onChange event inside the component by sending a new entry with the .next() function.

      References:
      https://stackoverflow.com/questions/67281667/how-to-use-child-components-in-angular-reactive-forms

      https://www.youtube.com/watch?v=xTcJQaWiJ2c

        Attachments

          Issue Links

          There are no Sub-Tasks for this issue.

            Activity

              People

              • Assignee:
                Tristan.Strong Tristan Strong
                Reporter:
                david.craft David Craft (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 16h
                  16h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 15h 31m Time Not Required
                  15h 31m

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.