ionic-team / ionic-team/ionic-framework

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

未关闭
#23,685 14 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看
package: core type: feature request
主要语言
TypeScript
星标
52.7k
派生
13.3k
平均合并
1 天 15 小时
30 天内合并 PR
51

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。