Skip to content

fix(@uppy/angular): apply initial open value after the plugin mounts - #6494

Open
mifi wants to merge 2 commits into
transloadit:mainfrom
mifi:claude/pr-upstream-repo-admq7d
Open

fix(@uppy/angular): apply initial open value after the plugin mounts#6494
mifi wants to merge 2 commits into
transloadit:mainfrom
mifi:claude/pr-upstream-repo-admq7d

Conversation

@mifi

@mifi mifi commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Note: I have no angular experience and cannot verify this:

Angular runs ngOnChanges before ngOnInit, and this.plugin is only assigned in ngOnInit -> onMount. So <uppy-dashboard-modal [open]="true"> threw TypeError: Cannot read properties of undefined (reading 'openModal') on the very first change detection pass.

Apply the current open value in ngOnInit, right after the plugin is mounted — the initial value only ever appears in that first SimpleChanges, so guarding the call alone would silently drop it. ngOnChanges now bails out until the plugin exists and handles only post-mount transitions; on that first pass every input still carries previousValue: undefined, so all of its branches were no-ops anyway.

Claude-Session: https://claude.ai/code/session_01MKvGt7BTgQQ6MxHUWBDWpP

Angular runs `ngOnChanges` before `ngOnInit`, and `this.plugin` is only
assigned in `ngOnInit` -> `onMount`. So `<uppy-dashboard-modal [open]="true">`
threw `TypeError: Cannot read properties of undefined (reading 'openModal')`
on the very first change detection pass.

Apply the current `open` value in `ngOnInit`, right after the plugin is
mounted — the initial value only ever appears in that first `SimpleChanges`,
so guarding the call alone would silently drop it. `ngOnChanges` now bails
out until the plugin exists and handles only post-mount transitions; on that
first pass every input still carries `previousValue: undefined`, so all of
its branches were no-ops anyway.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MKvGt7BTgQQ6MxHUWBDWpP
@changeset-bot

changeset-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f406933

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@uppy/angular Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

3 participants