andlabs / andlabs/ui

Any way to get form children?

Offen
#348 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
8.4k
Forks
639
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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)
}
}
}
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.