Skip to content

Allow optional arrays to have array methods #1588

@MPiland

Description

@MPiland

Much of my data is optional as I'm building a content creation form for TTRPG systems. This is a fairly complex form and there's a lot of variety even within a group of what's actually required. And rather than filling in empty arrays automatically to just have to disregard them when the data is submitted, I leave them optional. As of right now, when trying to use the removeFieldValue method, it will types the optional field as never.

A work around is to a copy of the array with the value removed and then using setFieldValue.

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