github / github/check-all

Unwanted Behavior when one checkbox is checked

Aperta
#59 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
89
Fork
19
Merge medio
2g 8h
PR unite (30g)
5

Descrizione

Code automatically checked the "check-all" box if any one of the checkboxes is checked (line 87 in src/index.ts)

Proposed change: replace with the following if statement

if ((total - count) == 0) {
setChecked(target, allCheckbox, checked, indeterminate);
}

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start at line 87 in src/index.ts and inspect how the total and checked counts determine the check-all state. Change the condition so the check-all box is set only when all checkboxes are checked, then verify that selecting one checkbox no longer checks it while selecting all still does.

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

Valutazione

Stack tecnologico
typescript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
1/5
Tempo stimato
Meno di un'ora
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
55/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.