ionic-team / ionic-team/ionic-framework

feat: ion-refresher "isOpen" flag

Aperta
#30,739 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
triage
Lingua principale
TypeScript
Stelle
52.7k
Fork
13.3k
Merge medio
1g 15h
PR unite (30g)
51

Descrizione

### Prerequisites

- [x] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/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

Introduce an isOpen flag to ion-refresher component, so we can trigger the refresher via boolean flag from controller.

### Describe the Use Case

We have a lot of pages that trigger an initial load of data when entering the page. For that we want to show a loading state. But additional to that, we also want to provide the possibility to always refresh the data with pull down to refresh. For that we are using ion-refresher.

Now we have two "loading indicators" that we need to handle differently, one spinner that is shown on a flag and the ion-refresher that needs to be completed via an event. It would be great if we could just use ion-refresher for the whole loading indicator on the page alltogether by allowing the component to show and hide the spinner via a boolean flag.

### Describe Preferred Solution

Add isOpen flag similar as done in inline modal https://ionicframework.com/docs/api/modal#using-isopen

### Describe Alternatives

_No response_

### Related Code

_No response_

### Additional Information

_No response_

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start with the ion-refresher component and compare its public API and behavior with inline modal's isOpen pattern linked in the issue. Define how the boolean-controlled loading state interacts with pull-to-refresh completion, then verify that both initial loading and manual refresh can be shown and hidden as requested.

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

Valutazione

Stack tecnologico
typescript
Ambito
frontend
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.