Allow Label to set button component without onClick
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- frontend
Direzione di ricerca
Inizia dal componente Label e dai test esistenti, quindi traccia come cambia l’elemento renderizzato quando viene fornito onClick. Definisci il modo supportato per richiedere un pulsante senza onClick e verifica che Label esegua il rendering di un pulsante nativo con il comportamento di focus previsto, mantenendo invariato l’uso esistente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the enhancement or change
Currently, in order for a clickable Label to render with the button element in the DOM is to pass an onClick handler to it. There may be use cases where an onClick isn't desired - one example being the new Canvas pattern in Chatbot where a clickable Label opens a Popover. In this case the Popover is passed the Label as a child (rather than using triggerRefs and the Label's onClick to dictate the Popover open state).
Allowing Label to set a button element could help in those sorts of scenarios, instead of needing to pass a triggerRef, onClick to Label, and onHidden to Popover (which may result in some funky focus behavior).
Is this request originating from a Red Hat product team? If so, which ones and is there any sort of deadline for this enhancement?
Any other information?
Not blocking as there is a workaround of setting role and tabindex on a normal Label, but it lacks some focus styles and it would be better for us to support this internally with native elements.
Jira Issue: PF-4637
- Lingua principale
- TypeScript
- Stelle
- 862
- Fork
- 392
- Merge medio
- 4g 8h
- PR unite (30g)
- 9
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di patternfly/patternfly-react
-
PF Team
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
patternfly/patternfly-react#12651 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
patternfly/patternfly-react#12637 ·
-
PF Team
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
patternfly/patternfly-react#12617 · 1 commento ·
-
PF Team
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
patternfly/patternfly-react#12610 · 1 commento · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
patternfly/patternfly-react#12600 ·
Tutte le issue di patternfly/patternfly-react
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
0xMiden/bridge-portal#132 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area:tools bug good first issue help wanted priority:P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
TaewoooPark/Motifcode#14 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
newrelic-experimental/preflight#793 · 1 commento ·