Scope operators
Two scope operators sit between the chain root and the leaf method:
| Method | Restricts the match to widgets that… |
|---|---|
tag(name) | …have name in their tags array. |
state(name) | …are inside a form where the named state is currently active. |
import { gui } from '@golemui/gui-shared';
// Disable every action while the 'submitting' state is activegui.selectors.state('submitting').actions({ disabled: true });
// Apply auto-placeholders only to inputs tagged 'identity'gui.selectors.tag('identity').inputs({ suppressAutomaticPlaceholders: false });state resolves against the form’s state map (the same one you declare via formConfig.states or via the gui.* states arg).
See also
Section titled “See also”- Multi-value scopes —
tagsAnd,tagsOrfor matching multiple tags at once. - Chaining — composition order.