developit / developit/preact-mdl

[MDL bug for info] Cannot dynamically add Tabs

Aperta
#34 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
192
Fork
20
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

This is for information for anyone else pulling their hair out - there's a fundamental flaw in the implementation of the tabs in MDL that you will hit in any dynamic frontend library.

https://github.com/google/material-design-lite/issues/1165

Due to the way that the elements used for the tabs (and panels) are found and decorated, any tabs added to a tab set after an initial render won't get the JS listeners invoked. I've found that the first tab in the set gets a second listener instead of the second tab getting it.

There's workarounds in the linked issue - I'm trying to find the best one for my use case at the moment.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia leggendo l’issue #1165 collegata di Material Design Lite e riproducendo il comportamento descritto con schede aggiunte dopo il rendering iniziale. Confronta le soluzioni alternative disponibili con questa integrazione di Preact MDL; l’issue non definisce una correzione specifica né un test di completamento.

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

Valutazione

Stack tecnologico
javascript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
20/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.