Skip to content

fix(picker-column): commit value on outside press - #31397

Merged
ShaneK merged 2 commits into
mainfrom
FW-7706
Aug 21, 2026
Merged

fix(picker-column): commit value on outside press#31397
ShaneK merged 2 commits into
mainfrom
FW-7706

Conversation

@ShaneK

@ShaneK ShaneK commented Aug 21, 2026

Copy link
Copy Markdown
Member

Issue number: resolves #30449


What is the current behavior?

ion-picker-column commits the centered option on a 250ms idle timer that only starts once the wheel stops moving. Flick a wheel and tap a Save button while it's still coasting, and the click handler reads the previous value. On an ion-datetime with preferWheel, the wheel shows one date while value still reports another.

What is the new behavior?

During a scroll the user started, the column watches for pointerdown anywhere outside itself. On that press it halts the wheel on the option under the highlight and commits it synchronously, so an application's own click handler reads the value the user can see. A press on a sibling wheel in the same picker is exempt, so reaching for the next column leaves the first one coasting. The datetime wheel handlers now read the working and active parts at event time, because an outside press settles every coasting column in one synchronous dispatch and the previous render-time reads clobbered each other.

Does this introduce a breaking change?

  • Yes
  • No

Other information

The community PR for this issue, #30674, was a great attempt, but it takes the reporter's other suggestion and adds public ionScrollStart and ionScrollEnd events to ion-picker-column and ion-datetime. I didn't go that way for two reasons. It's permanent public API on two components plus the Angular and Vue proxies, carried by every consumer forever, to work around a bug. More importantly it doesn't fix the stale value: every app has to write the disable-Save logic itself, and its ionScrollEnd is debounced 300ms after the wheel settles, so a tap during the flick still reads the old value at the moment the click handler runs. Committing on pointerdown fixes existing apps with no code change. The scroll events are a fair feature request on their own, just a separate one from this bug fix.

Preview:

  • Picker column scroll: iOS / MD
  • Datetime prefer-wheel: iOS / MD

@ShaneK
ShaneK requested a review from a team as a code owner August 21, 2026 15:41
@ShaneK
ShaneK requested a review from OS-jacobbell August 21, 2026 15:41
@vercel

vercel Bot commented Aug 21, 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 21, 2026 3:41pm

Request Review

@github-actions github-actions Bot added the package: core @ionic/core package label Aug 21, 2026

@thetaPC thetaPC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@ShaneK
ShaneK added this pull request to the merge queue Aug 21, 2026
Merged via the queue into main with commit 95e2224 Aug 21, 2026
54 checks passed
@ShaneK
ShaneK deleted the FW-7706 branch August 21, 2026 20:07
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: ion-datetime and ion-picker-column do not emit reliable change or scroll events, causing stale values on Save

2 participants