content: add example of event binding to ion-item-sliding
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- angular, typescript
- Lĩnh vực
- documentation
Hướng nghiên cứu
Bắt đầu từ trang tài liệu về cách sử dụng cơ bản của ion-item-sliding và so sánh trang này với ví dụ StackBlitz được liên kết, đặc biệt là src/app/example.component.ts. Ghi lại cách xử lý nhấp chuột hoạt động của Archive/Delete và các thay đổi dữ liệu mà nó minh họa, sau đó làm rõ hành vi overslide và ghi chú về ionSwipe dành cho người dùng web.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe Problem
https://ionic-docs-o31kiyk8l-ionic1.vercel.app/docs/v8/api/item-sliding#basic-usage
The basic usage does example the template part only, but it is really unclear how to make this work with the logic part (especially for beginners, when you have no idea how things work)
Some primary issues:
- How to bind the simple click event of the option to the function of component class
- How to bind the 'overslide' - i.e. when user drags the sliding item far from the starting point, so the last option will trigger automatically on slide release
Describe Preferred Solution
I've spent some time to make an example of Arhive-Delete drag with working template, so dragging/clicking Archive or delete is actually works and reflects the data:
https://stackblitz.com/edit/angular-t9fwgq5c?file=src%2Fapp%2Fexample.component.ts
I may not be perfect because I also don't know the right approach for good overslide
Describe Alternatives
Take a look at angular material documentation for MatTable (or just look for other components) as an example:
https://material.angular.dev/components/table/examples
It has first example as basic usage, and more use cases for every matter you can think of.
Additional Information
There is a subtle note on ionSwipe https://ionic-docs-o31kiyk8l-ionic1.vercel.app/docs/v8/api/item-sliding#expandable-options, but ionSwipe does not work for me (or at least on PC Web version which I develop and test on)
And I usually check the code, skipping the reading part (I don't think I am the only person who skips text)
So trivial task like 'copy-paste' of a working example turns into pain in the ass, requiring to spend time researching...
- Ngôn ngữ chính
- MDX
- Star
- 621
- Fork
- 3.2k
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 86
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ionic-team/ionic-docs
-
content
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
ionic-team/ionic-docs#4705 ·
-
content package: angular
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 78/100
ionic-team/ionic-docs#4702 ·
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
ionic-team/ionic-docs#4546 ·
-
content: broken link Đang mởcontent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ionic-team/ionic-docs#4381 · 2 bình luận ·
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
ionic-team/ionic-docs#3639 ·
Tất cả issue của ionic-team/ionic-docs
Issue tương tự
-
sync-en
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
agilepathway/label-checker#640 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
BasedHardware/omi#15662 · 1 bình luận ·
-
documentation help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100