Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

(this page was created automatically. In case of formatting issues, please visit the official Wiki Page)

Single Select

Overview

  • The Single Select component is a dropdown form control.
  • It allows users to select a single option from a list.
  • Options can come from a static list or a dynamic API endpoint.
  • It is useful for forms where one choice must be made, such as categories, statuses, or roles.

Example Single Select

Specs

Tokens

TokenDescription
placeholderTranslationsPlaceholder text with localization
initValueInitial selected value on first render
disabledDisables user interaction
showClearIconShows icon to clear selection
hiddenKeeps in structure but hides visually
saveInLocalStoragePersists selection in local storage
defaultValueValue used on form reset
readonlyShows value but blocks changes
dataFieldField name used on submit
useStaticDataToggle static vs. dynamic options
staticDataPredefined options list when static
dataSourcePathPath to options in API response
dataSourceIdAPI endpoint ID for options
getEntityCollectionHttpRequestParametersMapHTTP params map for fetch requests
modelValueField holding option value
modelDisplayValueField holding option label
emitObjectEmit full object instead of value
controlsRequestTypePlacement of value in request
pageSizePage size for options pagination
loadAllAuto-fetch all pages of options
validationValidation rules container
requiredEnforces a selection is made
authorizationDisablePolicy that disables component
eventsConfigurable event handlers
ON_VALUE_CHANGEFires when selection changes
ON_INIT_BASED_ON_USER_VIEWFires on init in user view mode
ON_INITFires when component initializes
ON_DESTROYFires when component is removed

Structure

(Configured in Visual Properties)

  • saveInLocalStorage - Determines whether the component's selected value is preserved in local storage between sessions.

Load Data

(Configured in Visual Properties)

  • initValue - Defines an initial value that will be selected when the component is first rendered.
  • defaultValue - Sets the value that will be used when the form is reset.

(Configured in Non-Visual Properties)

  • useStaticData - Determines whether the dropdown options come from a static list or a dynamic data source.
  • staticData - Specifies the predefined list of options when useStaticData is true.
  • dataSourcePath - Specifies the path in the response data where the list of options can be found.

Static data dialog

(Configured in Datasource Properties)

  • dataSourceId - Specifies the API endpoint ID for retrieving dropdown options when useStaticData is false.
  • getEntityCollectionHttpRequestParametersMap - Configures HTTP parameters for data fetching requests.
  • loadAll - Determines whether all options should be loaded at once regardless of pagination settings.
  • pageSize - Sets the number of options to load per page when pagination is enabled.

Submit Data

(Configured in Non-Visual Properties)

  • dataField - Defines the field name that will be used when submitting form data.
  • controlsRequestType - Specifies how the field data is sent in HTTP requests: 'BODY', 'HEADER', or 'PATH'.
  • emitObject - Determines whether the entire object or just the value is submitted when an option is selected.

(Configured in Datasource Properties)

  • modelValue - Identifies which field in the API response contains the value to be submitted when an option is selected.
  • modelDisplayValue - Identifies which field in the API response contains the text to display for each option.

Styling

(Configured in Visual Properties)

  • placeholderTranslations - Sets the placeholder text displayed when no option is selected, with support for multiple languages.
  • showClearIcon - Determines whether to display an icon that allows users to clear the current selection.

Actions & Variants

Actions

(Configured in Event Actions)

  • events - Configures the events that the component can trigger and respond to.
  • ON_VALUE_CHANGE - Triggered when the user selects a different option.
  • ON_INIT_BASED_ON_USER_VIEW - Triggered specifically when the component initializes in user view mode rather than edit mode.
  • ON_INIT - Triggered when the dropdown component is initialized.
  • ON_DESTROY - Triggered when the component is removed from the DOM.

Variants

(Configured in Visual Properties)

  • hidden - Controls whether the component is visible in the form.
  • disabled - Controls whether the dropdown can be interacted with by users.
  • readonly - Controls whether the selection can be changed by users.

Single Select Variants

Validation

(Configured in Validation Properties)

  • validation - Configures validation rules for the single select dropdown.
  • required - When set to true, an option must be selected before the form can be submitted.

Authorization

(Configured in Authorization Properties)

  • authorizationDisable - Specifies a policy set that determines when the component should be disabled based on user permissions.

Guidelines

[NO DATA AVAILABLE]

Accessibility

[NO DATA AVAILABLE]