andlabs / andlabs/ui

Any way to get form children?

Aperta
#348 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
8.4k
Fork
639
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

So currently I am using a method to get the children of the form, but as its not part of the andlabs ui it gets removed on dep ensure.

```go
func (f *Form) Count() int {
count := len(f.children)
return count
}
```

Is there a better way to be doing this? I need this functionality to refresh the form on button click such as, so I can allow the UI to be more dynamic.

```go
func clearForm(entryForm *ui.Form) {
for entryForm.Count() > 0 {
for x := 0; x <= entryForm.Count(); x++ {
entryForm.Delete(0)
}
}
}
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.