feat(refresher): add ionPullStart and ionPullEnd events#30946
feat(refresher): add ionPullStart and ionPullEnd events#30946ShaneK wants to merge 2 commits intofeature-8.8from
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Add two new events to the refresher component: - ionPullStart: emitted when the user begins pulling down - ionPullEnd: emitted when the refresher returns to inactive state, with a reason property indicating 'complete' or 'cancel' The existing ionStart event is deprecated in favor of ionPullStart for clearer naming that describes what the event represents. Closes #24524 Co-authored-by: Patrick McDonald <764290+WhatsThatItsPat@users.noreply.github.com>
|
Thanks for the update. I look forward to playing with it. I have something related on my mind. On a page without a refresher, you can obviously still pull down and rubber band past the top ( I think you should be still be considered scrolling when you're rubber banding / elastic scrolling, even if you manually pause the scroll. Only when Anyway, I haven't thought of that in a year+, but I'm pretty sure that's the issue. This one reminded me of it because of the start and end stuff. Maybe I'll look at that again in my free time. |
Issue number: resolves #24524
What is the current behavior?
There is no way to know when the refresher has fully returned to its inactive state after a pull gesture. The existing
ionStartevent fires when pulling begins, but there is no corresponding end event. Watching the progress property is insufficient because hitting zero doesn’t necessarily mean the user has completed the pull gesture.What is the new behavior?
Two new events are added to the refresher component:
ionPullStart: Emitted when the user begins pulling down (same asionStart, which is now deprecated)ionPullEnd: Emitted when the refresher returns to inactive state, with areasonproperty of'complete'or'cancel'indicating whether the refresh operation completed successfully or was cancelledThis allows you to know both when the user is no longer touching the screen AND when the refresher is ready to be pulled again.
Does this introduce a breaking change?
Other information
Test page:
https://ionic-framework-git-fw-6591-ionic1.vercel.app/src/components/refresher/test/basic/index.html
Current dev build: