The Dynamic Lookup Input Component is a specialized form control that allows users to search and select an item from a popup dialog containing a data grid. It's particularly useful when selecting from large datasets where a traditional dropdown would be impractical. The component displays the selected value in a read-only input field that, when clicked, opens a dialog with a searchable data grid for item selection.
labelTranslations - Sets the field label with support for multiple languages. For example, {"en-US": "Customer", "de-DE": "Kunde"} ensures proper localization of the field label.
dialogTitleTranslations - Sets the title text displayed at the top of the lookup dialog with support for multiple languages. For example, {"en-US": "Select Customer", "de-DE": "Kunde auswählen"} ensures users understand the purpose of the dialog.
dialogSubtitleTranslations - Sets an optional subtitle text displayed below the dialog title with support for multiple languages. For example, {"en-US": "Active customers only", "de-DE": "Nur aktive Kunden"} provides additional context about the displayed data.
hidden - Controls whether the component is visible in the form. When set to true, the component remains in the form structure but is not displayed, which is useful for conditional rendering based on other field values.
saveInLocalStorage - Determines whether the field's value is preserved in the user's local storage between sessions. When enabled, the selected value will persist if the user reloads the page, providing a better user experience for complex forms.
defaultValue - Sets the initial value to be used when the form is reset. For example, setting to "00001" would pre-select the customer with ID "00001" when the form is initially loaded or reset.
readonly - Controls whether the lookup value can be changed by the user. When set to true, the lookup field displays its value but cannot be modified, which is useful for display-only scenarios.
getElementsDataSourceId - Specifies the data source ID for retrieving data to populate the lookup dialog. For example, "api/customers" connects the component to the customers API endpoint.
getEntityCollectionHttpRequestParametersMap - Configures HTTP parameters for data fetching. This object maps additional parameters needed for the API request, which can include query parameters, path parameters, or fixed values that should be sent with every request.
enablePagination - Activates server-side pagination for large datasets in the lookup dialog. When enabled, data is loaded in pages rather than all at once, significantly improving performance for tables with many records.
pageSize - Sets the number of records displayed per page in the lookup dialog. For example, setting to 25 will display 25 records per page when pagination is enabled, providing a balance between visibility and performance.
valueKey - Defines the field in the data objects that should be used as the value when an item is selected. For example, setting to "id" will store the ID of the selected customer as the field value.
displayValueKey - Defines the field in the data objects that should be displayed in the input field after selection. For example, setting to "name" will show the customer's name in the input field, even though the ID might be stored as the actual value.
dataField - Defines the field name that will be used when submitting form data. For example, setting to "customerId" ensures the selected customer ID is submitted with this field name in the data object.
controlsRequestType - Specifies how the field data is sent in HTTP requests: 'BODY', 'HEADER', or 'PATH'. For example, setting to "BODY" includes the field in the request body, which is standard for most form submissions.