bug: Ion Input ClearInputIcon not working - Angular

Aperta
#30,901 1 commento 2 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
angular, typescript
Ambito
frontend

Direzione di ricerca

Inizia dalla riproduzione StackBlitz collegata e dalla gestione Angular di ion-input per clearInputIcon; confronta l’uso come semplice attributo con il property binding e il comportamento esistente di clearInput. Il lavoro è completato quando l’icona indicata viene renderizzata con clearInput abilitato senza richiedere CUSTOM_ELEMENT_SCHEMA e il comportamento è documentato se necessario.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
52.8k
Fork
13.3k
Merge medio
3g 1h
PR unite (30g)
86

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ionic-team/ionic-framework

Tutte le issue di ionic-team/ionic-framework

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.