Skip to content

Scope operators

Two scope operators sit between the chain root and the leaf method:

MethodRestricts 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 active
gui.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).