ionic-team / ionic-team/ionic-framework

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

Offen
#23,685 14 Kommentare 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
package: core type: feature request
Vorherrschende Sprache
TypeScript
Sterne
52.7k
Forks
13.3k
Ø Merge
1 T. 15 Std.
Gemergte PRs (30 T.)
51

Beschreibung

### 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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.