Class JJSearchBox
- Namespace
- JJMasterData.Core.UI.Components
- Assembly
- JJMasterData.Core.dll
Represents a searchable combobox.
public class JJSearchBox : ControlBase
- Inheritance
-
JJSearchBox
- Inherited Members
Constructors
JJSearchBox(IHttpRequest, IEncryptionService, DataItemService)
public JJSearchBox(IHttpRequest request, IEncryptionService encryptionService, DataItemService dataItemService)
Parameters
request
IHttpRequestencryptionService
IEncryptionServicedataItemService
DataItemService
Properties
AutoReloadFormFields
When reloading the panel, keep the values entered in the form (Default=True)
public bool AutoReloadFormFields { get; set; }
Property Value
ConnectionId
public Guid? ConnectionId { get; set; }
Property Value
- Guid?
DataItem
public FormElementDataItem DataItem { get; set; }
Property Value
FormStateData
public FormStateData FormStateData { get; set; }
Property Value
HtmlId
public string HtmlId { get; set; }
Property Value
NumberOfItems
Maximum number of items that will be displayed in the search list (Default = 30)
public int NumberOfItems { get; set; }
Property Value
RouteContext
protected RouteContext RouteContext { get; }
Property Value
ScrollBar
Show scrollbar in search list (Default = false)
public bool ScrollBar { get; set; }
Property Value
Remarks
Used to show scrollBar when there are too many match records and it's set to True. If this option is set to true,the HTML menu will be set to:
SelectedValue
public string SelectedValue { get; set; }
Property Value
Text
public string? Text { get; set; }
Property Value
TriggerLength
Minimum number of characters entered to trigger the search (Default = 1)
public int TriggerLength { get; set; }
Property Value
Methods
BuildResultAsync()
protected override ValueTask<ComponentResult> BuildResultAsync()
Returns
GetDescriptionAsync(string)
Retrieve description based on id
public Task<string?> GetDescriptionAsync(string searchId)
Parameters
searchId
string
Returns
GetSelectedValueAsync()
Id corresponding to the searched text
public Task<string?> GetSelectedValueAsync()
Returns
Events
OnSearchId
Event triggered to retrieve description based on Id
public event EventHandler<SearchBoxItemEventArgs>? OnSearchId
Event Type
OnSearchQuery
Event triggered to retrieve records with part of the text entered
public event EventHandler<SearchBoxQueryEventArgs>? OnSearchQuery