Table of Contents

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 IHttpRequest
encryptionService IEncryptionService
dataItemService DataItemService

Properties

AutoReloadFormFields

When reloading the panel, keep the values entered in the form (Default=True)

public bool AutoReloadFormFields { get; set; }

Property Value

bool

ConnectionId

public Guid? ConnectionId { get; set; }

Property Value

Guid?

DataItem

public FormElementDataItem DataItem { get; set; }

Property Value

FormElementDataItem

FormStateData

public FormStateData FormStateData { get; set; }

Property Value

FormStateData

HtmlId

public string HtmlId { get; set; }

Property Value

string

NumberOfItems

Maximum number of items that will be displayed in the search list (Default = 30)

public int NumberOfItems { get; set; }

Property Value

int

RouteContext

protected RouteContext RouteContext { get; }

Property Value

RouteContext

ScrollBar

Show scrollbar in search list (Default = false)

public bool ScrollBar { get; set; }

Property Value

bool

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

string

Text

public string? Text { get; set; }

Property Value

string

TriggerLength

Minimum number of characters entered to trigger the search (Default = 1)

public int TriggerLength { get; set; }

Property Value

int

Methods

BuildResultAsync()

protected override ValueTask<ComponentResult> BuildResultAsync()

Returns

ValueTask<ComponentResult>

GetDescriptionAsync(string)

Retrieve description based on id

public Task<string?> GetDescriptionAsync(string searchId)

Parameters

searchId string

Returns

Task<string>

GetSelectedValueAsync()

Id corresponding to the searched text

public Task<string?> GetSelectedValueAsync()

Returns

Task<string>

Events

OnSearchId

Event triggered to retrieve description based on Id

public event EventHandler<SearchBoxItemEventArgs>? OnSearchId

Event Type

EventHandler<SearchBoxItemEventArgs>

OnSearchQuery

Event triggered to retrieve records with part of the text entered

public event EventHandler<SearchBoxQueryEventArgs>? OnSearchQuery

Event Type

EventHandler<SearchBoxQueryEventArgs>