E0335: A LiveSchema field that isn't the page's
l.Field names a field by its address, so it takes the address of one of the page's own fields: &d.Q where d is the LiveSchema method's receiver. A field of a struct the page holds, a variable, a nil attribute or a LiveSchema method that panics is refused when the page is checked at start-up; vukavet reports it from the source. So is an @ui.URL field the URL can't hold — a map, a struct without UnmarshalText — or whose Default isn't of its type (URL State).
Wrong
go
var query string
func (d *Dashboard) LiveSchema(l *ui.LiveSchema) {
l.Field(&query, ui.Bind{})
}Right
go
func (d *Dashboard) LiveSchema(l *ui.LiveSchema) {
l.Field(&d.Q, ui.Bind{})
}