Skip to content

setFieldsValue bug with union type of Array and null #43305

Closed
@AndreiTS

Description

@AndreiTS

Reproduction link

I cannot reproduce this on codesanbox, probably because it's using a different typescript version, so I'm using
TypeScript playground

Steps to reproduce

Open TypeScript playground link and check the error.

What is expected?

Is expected that setFieldsValue supports properties of type Array | null

What is actually happening?

setFielsValue errors on properties of type Array | null

Environment Info
antd 5.6.3
React 18.2.0
TypeScrpt 5.1.6
System Windows 11
Browser Firefox 102

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions