Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow standalone field components without forms #14999

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

aptkingston
Copy link
Member

Description

This PR allows using field components without forms. That means they do not need to be wrapped in a Form component (but still can be, of course) and provide a global binding of their value to use as you like.

Almost all field types support this usage. The only exceptions are attachments (both single and multiple), signatures and relationship pickers, as these require being bound to a datasource to be functional.

Clarification:

  • The field setting is now optional when using fields standalone. The component name rather than the field setting will be used to generate the global binding
  • All settings work as expected - validation, default values, on change etc.

Quick example of filtering using a standalone field

Here's a screen with a table, and I've dropped an options picker above it:
image

Here's my component tree - just the table and some fields without a form:
image

I can filter my table using the new global bindings:
image

The field configuration can be left completely blank (I've added a placeholder but that's optional of course):
image

Quick example of saving rows

You also don't need a form to create rows when using fields like this. You can simply add a button, leave datasource to "None" and bind up the values:
image

Launchcontrol

Allow using fields without forms.

Copy link

qa-wolf bot commented Nov 8, 2024

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

@github-actions github-actions bot added the size/m label Nov 8, 2024
@aptkingston aptkingston marked this pull request as ready for review November 8, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant