Skip to content

fix(refresher): validate slot after frameworks assign it - #31377

Merged
ShaneK merged 2 commits into
mainfrom
FW-7700
Aug 20, 2026
Merged

fix(refresher): validate slot after frameworks assign it#31377
ShaneK merged 2 commits into
mainfrom
FW-7700

Conversation

@ShaneK

@ShaneK ShaneK commented Aug 19, 2026

Copy link
Copy Markdown
Member

Issue number: resolves #31376


What is the current behavior?

Currently, ion-refresher reads its slot attribute in connectedCallback and gives up if it isn't fixed. In v9 @ionic/react uses the custom elements build, so connectedCallback runs while the element is still being inserted, which is before React assigns the slot. The check fails on perfectly correct markup, logs the "Make sure you use" error, and the pull-to-refresh gesture never gets created. This affects React 18 and 19.

What is the new behavior?

The check now runs in componentWillLoad, which is late enough that frameworks have assigned the slot, but still before rendering puts slot="fixed" on the host. Gesture setup no longer bails, so the refresher works whether the slot is in the markup or arrives later, and correctly written React apps stop logging the error. Markup that genuinely omits the slot still gets it.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Current dev build:

9.0.1-dev.11787177893.1979eb13

@ShaneK
ShaneK requested a review from a team as a code owner August 19, 2026 22:16
@ShaneK
ShaneK requested a review from OS-jacobbell August 19, 2026 22:16
@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ionic-framework Ready Ready Preview Aug 20, 2026 3:55pm

Request Review

@brandyscarney brandyscarney left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good! Non-blocking suggestions. 🙂

Comment thread core/src/components/refresher/refresher.tsx
Comment thread core/src/components/refresher/test/slot-validation/refresher.e2e.ts
@ShaneK
ShaneK added this pull request to the merge queue Aug 20, 2026
Merged via the queue into main with commit d41f258 Aug 20, 2026
54 checks passed
@ShaneK
ShaneK deleted the FW-7700 branch August 20, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Pull to refresh example not working in v9

2 participants