Skip to content

FormField enhancements #4176

@ghsolomon

Description

@ghsolomon
  • Consider removing FormField's dependency on FormModel so FormField can be used in a more lightweight context -- such as simply for wrapping an input with a label and info.
  • Add ability to specify an "info tooltip" for cases where a field's description is too verbose to render inline.
  • Add ability to enable a "copy" button or context-menu from which to copy a field's value -- especially useful in read-only mode.
  • Add support for revert at the FormField level. Could expose via above-mentioned context-menu or as an action button that appears on-hover.
  • Add support for a "warning" state + message(s) -- should be displayed like validation errors, but with less severity (i.e. intent warning vs. danger) and still considered "valid" (i.e. user could still submit the form in a "warning" state).
  • Expose a rightItems prop for rendering additional elements within the FormField.
  • Consider styling readonly renderers to essentially look like disabled inputs (gray background) so they consume comparable space to their non-readonly counterparts.
  • Prevent flex-shrink in a vertically flexed field (we don't ever want to squish a field's label and input)
  • Add ability to register custom blockChildren for inputs that should not be wrapped in spans (or find another solution that avoids this list of component display names entirely): https://github.com/xh/hoist-react/blob/develop/desktop/cmp/form/FormField.ts#L203 , https://github.com/xh/hoist-react/blob/develop/desktop/cmp/form/FormField.ts#L203 ,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions