Skip to content

[4.x] Fix FileUpload not working inside collapsed Repeater#19139

Merged
danharrin merged 2 commits intofilamentphp:4.xfrom
People-Sea:fix/issues/16253-v4
Jan 30, 2026
Merged

[4.x] Fix FileUpload not working inside collapsed Repeater#19139
danharrin merged 2 commits intofilamentphp:4.xfrom
People-Sea:fix/issues/16253-v4

Conversation

@People-Sea
Copy link
Contributor

Description

Fixes: #16253

FilePond calculates layout dimensions on init. When inside a collapsed Repeater (display: none), all dimensions are 0, causing mispositioned elements and broken interactions.

Fix: Defer initialization until the element becomes visible.

Visual changes

Before

before.mov

After

after.mov

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 Jan 30, 2026
@People-Sea People-Sea changed the title [4.x] Fix FileUpload not working inside collapsed Repeater [4.x] Fix FileUpload not working inside collapsed Repeater Jan 30, 2026
return
}

if (this.$el.offsetParent === null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing I can think of is maybe add this.visibilityObserver?.disconnect() again above here, so that if the component is initialised by Alpine at some point again when the observer is already registered, we don't have two instances active at once?

Apart from that, this looks like a great solution to the problem, thanks!

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Roadmap Jan 30, 2026
@danharrin danharrin added the bug Something isn't working label Jan 30, 2026
@danharrin danharrin added this to the v4 milestone Jan 30, 2026
@danharrin
Copy link
Member

Maybe it's worth checking if this fixes issue #15394 too, since its a bit of a similar problem?

@People-Sea
Copy link
Contributor Author

Maybe it's worth checking if this fixes issue #15394 too, since its a bit of a similar problem?

@danharrin Thanks for the heads up! Will check if this resolves #15394 as well. ❤️

@danharrin danharrin merged commit 27b0ad7 into filamentphp:4.x Jan 30, 2026
11 of 23 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Roadmap Jan 30, 2026
@People-Sea People-Sea deleted the fix/issues/16253-v4 branch February 3, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

FileUpload doesn't work as intended in Repeater of Relation Manager

2 participants