Skip to content

Improve documentation for boxed values in form control #36746

@jpchavat

Description

@jpchavat

I'm submitting a ...

[ ] Regression (behavior that used to work and stopped working in a new release)
[ ] Bug report 
[ ] Feature request
[x] Documentation issue or request
[ ] Support request

Current behavior ...

controlsConfig: {[key: string]: any},

and
formState: any, validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null,

The documentation about the parameter formState in the method control(..) and the parameter controlsConfig in the method group(..) (see line reference) doesn't explain very well how to set it. Additionally, the type hints has presence of anys and makes it harder to understand.

Expected behavior

I propose the follow type hints changes to clarify the situation.

For the formState type hint:
string | { value: string, disabled: boolean }

For the controlsConfig type hint:
{ [key: string]: [string | {value: string, disabled: boolean}, ...any[]] }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions