bug: Ion Input ClearInputIcon not working - Angular

Đang mở
#30,901 1 bình luận 2 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
angular, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu với bản tái hiện StackBlitz được liên kết và cách Angular xử lý ion-input cho clearInputIcon; so sánh việc sử dụng thuộc tính thông thường với property binding và hành vi clearInput hiện có. Được xem là hoàn tất khi biểu tượng được chỉ định được hiển thị khi clearInput được bật mà không cần CUSTOM_ELEMENT_SCHEMA, và hành vi được ghi lại nếu cần.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

triage
Prerequisites
Ionic Framework Version

v8.x

Current Behavior

When using ion-input there is a property clearInputIcon where we can put the name of an imported icon as a string, it should replace the icon for the clear option when clearInput property is set to true but I only get the default one

Expected Behavior

When using ion-input there is a property clearInputIcon where we can put the name of an imported icon as a string, it should replace the icon for the clear option when clearInput property is set to true.

Steps to Reproduce
  1. In HTML Set an ion-input
  2. Set property clearInput to true
  3. Set property clearInputIcon to an icon for example "analytics-outline"
  4. In TS/JS import analyticsOutline from ionicons with the addIcons method
  5. You will see that the icon does not change
Code Reproduction URL

https://stackblitz.com/edit/fhf2js9x

Ionic Info

/

Additional Information

I've tested multiple things and the only to make it work is to use the property with binding [] syntax
The problem is that clearInputIcon is not recognized and we need to use the CUSTOM_ELEMENT_SCHEMA which should not happen (since the other properties for example clearInput do not need them).

Without this the component does not seem to recognize and user the clearInputIcon property on the ion-input

Can you check and confirm please ? We should be able to use this property as the other one easily without this, moreover this is not specified in the documentation.

Ngôn ngữ chính
TypeScript
Star
52.8k
Fork
13.3k
Merge trung bình
3 ngày 1 giờ
Pull request đã merge (30 ngày)
86

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ionic-team/ionic-framework

Tất cả issue của ionic-team/ionic-framework

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.