ionic-team / ionic-team/ionic-framework
feat: ion-reorder-group optional require-long-press prop
- Ngôn ngữ chính
- TypeScript
- Star
- 52.7k
- Fork
- 13.3k
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 51
Mô tả
### 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.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.