Skip to content

Conversation

vunizhona
Copy link
Contributor

Issue number: resolves #30449


What is the current behavior?

Wheel scrolling inside ion-datetime does not provide host-level lifecycle events for app code to react to start/end of scrolling.

What is the new behavior?

  • ion-datetime re-emits wheel scroll lifecycle events from inner columns:
    • ionScrollStart when any wheel column begins scrolling.
    • ionScrollEnd once all active columns settle, coalesced with a 300ms debounce.
    • Events do not bubble to avoid duplicate handling; they are emitted on the host.
  • ion-picker-column emits ionScrollStart and ionScrollEnd at scroll start/end.
  • API/types updated to expose the new events across frameworks (Angular/Vue proxies).

Does this introduce a breaking change?

  • Yes
  • No

Other information

  • core/src/components/datetime/datetime.tsx: capture-phase listeners, coalescing logic, new events
  • core/src/components/picker-column/picker-column.tsx: emits start/end at scroll boundaries
  • core/src/components/datetime/test/prefer-wheel/datetime.spec.ts: replace fake timers with explicit waits
  • core/api.txt, core/src/components.d.ts, Angular/Vue proxies: API surface/types for new events
  • Proxy changes are generated to reflect the new events(updated during the build).

Verification

  • Targeted specs: cd core && npm ci && npm run test.spec -- src/components/datetime/test/prefer-wheel/datetime.spec.ts (expect 3 passed).

  • Manual: cd core && npm start, open /src/components/datetime/test/prefer-wheel/index.html.

Scroll a wheel column: app receives one ionScrollStart at the beginning, one ionScrollEnd after settling.

vunizhona and others added 2 commits September 9, 2025 15:18
re-emit ionScrollStart/ionScrollEnd from wheel columns on ion-datetime by capturing inner ion-picker-column events and suppressing originals; coalesce multiple concurrent column scrolls into a single start/end with a 300ms end debounce
add ionScrollStart/ionScrollEnd to ion-picker-column and emit at scroll start/end
update API/types and Angular/Vue proxies to expose new events
stabilize prefer-wheel specs by replacing fake timers with real waits to avoid newSpecPage timeouts

closes ionic-team#30449
@vunizhona vunizhona requested a review from a team as a code owner September 9, 2025 12:56
@vunizhona vunizhona requested a review from ShaneK September 9, 2025 12:56
Copy link

vercel bot commented Sep 9, 2025

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

Project Deployment Preview Comments Updated (UTC)
ionic-framework Ready Ready Preview Comment Sep 9, 2025 0:57am

@github-actions github-actions bot added package: core @ionic/core package package: angular @ionic/angular package package: vue @ionic/vue package labels Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: angular @ionic/angular package package: core @ionic/core package package: vue @ionic/vue package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: ion-datetime and ion-picker-column do not emit reliable change or scroll events, causing stale values on Save
1 participant