E0322: Bad bind: tag
bind: marks a field of a page backed by a component as one the component sets (live.q.set(v)). It goes on an exported field of a JSON value (not a function, node, JS chain or state); its name, when given, is the field's handle (its json name, first letter lower-cased); live's own handles (pending, error, subscribe) can't be bound; the one option is debounce= in milliseconds or as a duration — as an attribute, @ui.Bind{Debounce: d}. Reported by vuka vet, the editor, and at boot, and by vukavet.
Wrong
vuka
type Orders struct {
ui.Live
Q string `json:"q" bind:"query"`
Status string `bind:"status,wait=1s"`
Pending bool `json:"pending"` @ui.Bind // live.pending is live's own
}Right
vuka
type Orders struct {
ui.Live
Q string `json:"q" bind:"q"`
Status string `bind:"status,debounce=1s"`
Waiting bool `json:"waiting"` @ui.Bind{Debounce: time.Second}
}