Skip to content

fix(react): skip undefined props in attachProps (v9) - #31349

Closed
ptmkenny wants to merge 1 commit into
ionic-team:major-9.0from
ptmkenny:react-attach-props-undefined-major-9
Closed

fix(react): skip undefined props in attachProps (v9)#31349
ptmkenny wants to merge 1 commit into
ionic-team:major-9.0from
ptmkenny:react-attach-props-undefined-major-9

Conversation

@ptmkenny

Copy link
Copy Markdown
Contributor

Issue number: resolves #31344

This is the v9 version of the PR #31345

@ptmkenny
ptmkenny requested a review from a team as a code owner August 12, 2026 16:01
@ptmkenny
ptmkenny requested a review from BenOsodrac August 12, 2026 16:01
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

@ptmkenny is attempting to deploy a commit to the Ionic Team on Vercel.

A member of the Team first needs to authorize it.

@ShaneK

ShaneK commented Aug 15, 2026

Copy link
Copy Markdown
Member

Hey @ptmkenny! Sorry to do this twice, but I'm closing this one too and going with a different approach in #31361

Skipping the assignment for nullish values changes what undefined means for a prop that has a default. Right now <IonModal backdropDismiss={maybeUndefined} /> writes undefined over the @Prop() default of true, so with the assignment skipped the backdrop would start dismissing when it didn't before. It would also leave the generated components behaving differently, since those go through @lit/react, which assigns and then removes the attribute.

The new one mirrors @lit/react instead, and it has the tests you asked for. Thanks for the reproduction, it made this a lot easier to work through.

@ShaneK ShaneK closed this Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: react @ionic/react package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants