Custom inputs guide - how to emit events from the FormKit component?
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
- 48/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ệ
- javascript
- Lĩnh vực
- documentation
Hướng nghiên cứu
Bắt đầu với hướng dẫn về custom input tại https://formkit.com/guides/create-a-custom-input và phần Architecture về việc phát sự kiện, sau đó xem lại discussion 943 và giải pháp được đề xuất trong đó. Công việc được coi là hoàn thành khi hướng dẫn về custom input giải thích phương pháp chính thức để phát sự kiện bằng một ví dụ mã hoạt động được và liên kết đến discussion liên quan nếu hữu ích.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Related discussion and solution by @SuddenDev: https://github.com/orgs/formkit/discussions/943#discussioncomment-9893014
In regards to emitting events from a custom FormKit input. I lost a lot of time today trying to figure this out, I could not find any related documentation to point me in the right direction.
All I found was a one-line note in the 'Architecture' documentation: https://formkit.com/essentials/architecture#emitting-events
Just adding a small paragraph with a code example in the custom input guide (https://formkit.com/guides/create-a-custom-input) would go a long way.
Currently I will use the solution suggested in the discussion above, which is to call the context prop as a function (feels kind of weird, but it works)
My confusion was that Props has first-class support and was very easy to add from the context object, it took me 10 minutes. But for emitting our own events from the component, there is almost nothing :(
I'd love to know if there is an 'official' Formkit way to emit events from inputs? Am I doing this all wrong?
Thank you for the great work on FormKit! If there is anything I can do to help contribute, let me know. Maybe even adding a link to the Github discussion in the documentation, would already save someone else a lot of searching.
Cheers.
- Ngôn ngữ chính
- JavaScript
- Star
- 19
- Fork
- 29
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 formkit/docs-content
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 50/100
formkit/docs-content#151 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 55/100
formkit/docs-content#148 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
formkit/docs-content#147 ·
-
formkit/docs-content#122 · 1 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
formkit/docs-content#118 · 1 bình luận ·
Tất cả issue của formkit/docs-content
Issue tương tự
-
Update HugeIcons library Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
antfu-collective/icones#398 ·
-
ECmail.com Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
wesbos/burner-email-providers#554 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
radiantearth/stac-browser#1023 ·
-
HMR stops working Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
components-web-app/docs#92 ·