Skip to content

Type selectors

Type selectors are the leaf methods of the selector chain — they match every widget of a given type and apply a decorator config.

import { gui } from '@golemui/gui-shared';
gui.selectors.inputs({ suppressAutomaticLabels: true }); // every input
gui.selectors.dropdowns({ height: 300 }); // every dropdown
gui.selectors.dateInputs({ dayFormat: '2-digit' }); // every dateInput
gui.selectors.actions({ disabled: false }); // every action

The leaf method names mirror the gui.<group>.* shortcuts — gui.inputs.textInput corresponds to gui.selectors.textInputs, and so on.

Each leaf has a <type>ByUid variant that targets a specific widget:

gui.selectors.dropdownByUid('country', { itemRenderer: 'countryItemRenderer' });
gui.selectors.textInputByUid('username', { autocomplete: 'username' });