Skip to content

Fix input-like element binding in Form elements #176

@the-overengineer

Description

@the-overengineer

Discussion prompted by #166

The current implementation of the library allows automatic binding of React input-like components if they behave like the following:

  • The component has input, text or field in its name,
  • The component has a name prop,
  • The component has an onChange prop.

This behaviour allows for components from external libraries to be used interchangably with normal inputs, if they fit those constraints.

This approach has issues with minification, and a bug or two in the implementation were discovered when discussing the code with @typerandom.

This needs to be implemented in another way, and one which is not reliant on component names, as minification will break it.

Preferably the existing code should be kept, to keep it backwards-compatible, we've had enough major releases for a month (even though there was a bug in the code that might have made it non-functional either way).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions