Skip to content

Allow a second argument to all Remote Function form inputs. #15097

@kwangure

Description

@kwangure

Describe the problem

While using Remote Function forms You can do this:

<input {...survey.fields.languages.as('checkbox', language)}>

But you cannot do this:

<input {...survey.fields.languages.as('text', language)}>

You must do this:

<input {...survey.fields.languages.as('text')} value={language}>

But you loose TypeScript validation.

Describe the proposed solution

All .as('<type>', ...) should allow the second argument, not just on non-keyboard inputs like 'checkbox', 'radio', 'hidden' etc. Consistent interface good.

Alternatives considered

No response

Importance

would make my life easier

Additional Information

No response

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