Skip to content

docs(forms): document visibility handling in relationship condition with saveRelationshipsWhenHidden#19786

Merged
danharrin merged 1 commit into
filamentphp:4.xfrom
Sngt25:patch-1
May 1, 2026
Merged

docs(forms): document visibility handling in relationship condition with saveRelationshipsWhenHidden#19786
danharrin merged 1 commit into
filamentphp:4.xfrom
Sngt25:patch-1

Conversation

@Sngt25

@Sngt25 Sngt25 commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Added section on using visibility in condition functions for relationship data.

Description

This PR adds documentation for using component visibility checks within relationship condition functions. It includes an example showing how to use $component->isVisible() in the condition, and highlights the critical requirement of calling saveRelationshipsWhenHidden() to preserve data when the component is hidden. This method is currently not indexed in the official docs, so the documentation provides important clarification.

Visual changes

N/A - Documentation only update

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@github-project-automation github-project-automation Bot moved this to Todo in Roadmap Apr 29, 2026
@danharrin danharrin added documentation Improvements or additions to documentation pending review labels Apr 29, 2026
@danharrin danharrin added this to the v4 milestone Apr 29, 2026
Added section on using visibility in condition functions for relationship data.

Signed-off-by: Sngt25 <151845701+Sngt25@users.noreply.github.com>
@danharrin danharrin changed the base branch from 5.x to 4.x May 1, 2026 12:13
@danharrin danharrin merged commit d315251 into filamentphp:4.x May 1, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in Roadmap May 1, 2026
@danharrin

Copy link
Copy Markdown
Member

I made some tweaks in 059cd01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants