ionic-team / ionic-team/ionic-framework

feat: ion-reorder-group optional require-long-press prop

Aperta
#23,685 14 commenti 3 reazioni 0 assegnatari Vedi su GitHub
package: core type: feature request
Lingua principale
TypeScript
Stelle
52.7k
Fork
13.3k
Merge medio
1g 15h
PR unite (30g)
51

Descrizione

### Prequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already include this feature request, without success.

### Describe the Feature Request

Add a new require-long-press prop to ion-reorder-group which enables reorder only after an item has been long-pressed.

### Describe the Use Case

1. Using reorder on a list of ion-item elements wrapped in ion-reorder tags is currently unfeasible on touch devices. Moving your finger up or down an item immediately initiates reorder, which prevents the user from scrolling the page.
2. Currently ion-item-sliding doesn't work on ion-item elements wrapped in ion-reorder tags.
3. Long-pressing to reorder is a common UI feature. (See the iOS built-in Reminders app, among others.)

### Describe Preferred Solution

Add an optional require-long-press prop to ion-reorder-group, which if set to true would require a long press before starting reorder.

### Describe Alternatives

I tried using a custom long-press gesture to toggle the ion-reorder-group disabled prop from false to true, but this doesn't work because the initial press event then doesn't register in ion-reorder-group.

### Related Code

_No response_

### Additional Information

I'll be submitting a pull request which implements the feature in the next day or two.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.