Skip to main content

Search

info

Path: Exchange/Pika View/Component/Search/SearchBar

The simple search bar, already built into the table, provides a wrapper around a text field that is able to be used in conjunction with other components, such as the Advanced Search Panel or the Table Component.

The simple search bar

Parameters

NameTypeDescription
enabledboolean

Flag that controls whether the text field is enabled.
Defaults to True.

searchstring

The value of the search box, an input/output parameter.

AdvancedSearchdictionary

Config options needed to connect this search bar to an Advanced Search Panel. An input/output parameter.

{
# boolean flag that indicates if the filter on the advanced search panel is active
'isApplied': false,
# boolean flag that indicates if the advanced search panel is currently open
# affects the appearance of the open advanced search panel button
'isOpen': false,
# boolean flag that controls if the advanced search panel button will be shown
'show': True
}

Search Panel

info

Path: Exchange/Pika View/Component/Search/SearchPanel

This is an advanced search panel that works with a Pikaview configured table. This component is included in the Table component.

An image of the advanced search panel

Parameters

NameTypeDescription
configdictionary

Configuration options for the panel.

{
# a list of Field json dictionaries, to limit which fields are available to search by
# if left null, will return all valid columns (default)
'columns': null,
# a Filter json dictionary
# represents the "base" state of the filter, which will be returned to when the panel is cleared
# if left null, the base state will have no filter (default)
'defaultFilterDict': null,
# the service config, which points the panel
# at a certain db schema and table
# defaults to null for all attributes, but will no work unless properly set
# to a valid metadata-configured table
'service': {
'schema': null,
'tableName': null
}
}
filterDictdictionary

An input/output parameter. Will reflect the current filter as built by the state of the panel.
Can also be supplied to set the current state of the panel. Defaults to null.
See also: Common Json Types/Filter

viewIdstring

The current calculated viewId of the parameter, determined by the panel's location in the DOM.
This is used in message handling as the unique ID of each panel.

Message Handlers

These components make use of message handlers for some functionality. These message handlers are used internally and automatically, but some can also be triggered externally in order to force certain events, such as setting the initial filter state externally.

exchange-pikaview-setFilter

When triggered, will parse the current value of filterDict and adjusts the inputs to match accordingly, useful for controlling the filter externally and having the state update visually.

Expected Payload
{
'viewId': string # the unique id of the targeted search panel, obtained from "viewId" parameter
}

exchange-pikaview-clearFilter

When triggered, will reset the filterDict and all the states of the input components. Sends the exchange-pikaview-searchPanelReset message, which is received by the inputs in order to reset their state. Can be triggered externally in order to clear any applied filters.

info

This message handler will reset the filter to the value as defined in config.defaultFilterDict.

Expected Payload
{
'viewId': string # the unique id of the targeted search panel, obtained from "viewId" parameter
}