Skip to content

feat: emit event when each reorder item snaps into place #27614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
sfinktah opened this issue Jun 7, 2023 · 3 comments
Open
3 tasks done

feat: emit event when each reorder item snaps into place #27614

sfinktah opened this issue Jun 7, 2023 · 3 comments
Labels
package: core @ionic/core package type: feature request a new feature, enhancement, or improvement

Comments

@sfinktah
Copy link

sfinktah commented Jun 7, 2023

Prerequisites

Describe the Feature Request

Need to be able to modify ion-item while it is being reordered in an ion-list

Describe the Use Case

Observe the graphical example, in which the numerical ordering of each item must change as it (or other) items are reordered.

image
image

Describe Preferred Solution

Adding an extra event, analogous to mousemove, complementing the existing event (analogous to mouseup or click)

<ion-list class="">
  <ion-reorder-group 
  :disabled="false" 
  @ionItemMove="handleMove($event)" 
  @ionItemReorder="handleReorder($event)">
...

Describe Alternatives

It is possible to achieve this using MutationObservers, but it is not pleasant.

Related Code

See above

Additional Information

PR has already be lodged.

@liamdebeasi
Copy link
Contributor

Thanks for the report. I am going to discuss this feature request with the team.

@sfinktah
Copy link
Author

sfinktah commented Jun 8, 2023

@liamdebeasi No probs, I put a live demo up at https://ionic-list.nt4.com/ with the source at https://nt4.com/ionic-list/

@liamdebeasi
Copy link
Contributor

liamdebeasi commented Jun 9, 2023

Thanks! I spoke with the team and we think this is a good feature to add to Ionic. Related issue for start/end events: #23148

@liamdebeasi liamdebeasi changed the title feat: event (emit) while reorderable ion-list is reordering feat: emit event when each reorder item snaps into place Jun 9, 2023
@liamdebeasi liamdebeasi added type: feature request a new feature, enhancement, or improvement package: core @ionic/core package labels Jun 9, 2023
@ionitron-bot ionitron-bot bot removed triage labels Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package type: feature request a new feature, enhancement, or improvement
Projects
None yet
Development

No branches or pull requests

2 participants