FormRecord wraps value in Partial · Issue #59985 · angular/angular · GitHub
Skip to content

FormRecord wraps value in Partial #59985

Closed

Description

@niksus-src

Which @angular/* package(s) are the source of the bug?

forms

Is this a regression?

Yes

Description

When using formRecord, it wraps the value in partial, even when the values on the key exactly exist

Image

Image

Image

Please provide a link to a minimal reproduction of the bug

https://stackblitz-starters-xoj4vkjq.stackblitz.io

Please provide the exception or error you saw

check the return type of the getRawValue function

Please provide the environment you discovered this bug in (run ng version)

"rxjs": "7.5.0",
    "tslib": "2.6.2",
    "zone.js": "0.14.3",
    "@angular/core": "17.2.3",
    "@angular/forms": "17.2.3",
    "@angular/common": "17.2.3",
    "@angular/router": "17.2.3",
    "@angular/compiler": "17.2.3",
    "@angular/animations": "17.2.3",
    "@angular/platform-browser": "17.2.3",
    "@angular/material": "17.0.4",
    "@angular/cdk": "17.1.3"

Anything else?

No response

Activity

  1. added this to the needsTriage milestone on Feb 18, 2025
  2. JeanMeche commented on Feb 18, 2025

    @JeanMeche
    Member

    This seems to be an issue around the FormRecord.setValue (which is used to infer the type of getRawValue())

    It is currently typed as

      setValue(
        value: {[key: string]: ɵValue<TControl>},
        options?: {
          onlySelf?: boolean;
          emitEvent?: boolean;
        },
      ): void;
    

    When arguably it should be

      setValue(
        value: {[key: string]: ɵRawValue<TControl>},
        options?: {
          onlySelf?: boolean;
          emitEvent?: boolean;
        },
      ): void;
    
  3. added a commit that references this issue on Feb 18, 2025
    ec1e4c3
  4. added a commit that references this issue on Feb 18, 2025
    cf36951
  5. angular-automatic-lock-bot commented on Mar 21, 2025

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  6. locked and limited conversation to collaborators on Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions