File

projects/components/src/widgets/common/search/search.component.doc.ts

Description

The wmSearch component defines the search widget.

Index

Methods
Inputs

Methods

onBeforeservicecall
onBeforeservicecall(widget: any, inputData: Object)

Callback function which will be triggered before the service call.

Parameters :
Name Type Optional Description
widget any No

Instance of the search widget

inputData Object No

object containing filter fields

Returns : void
onBlur
onBlur($event: MouseEvent, widget: any)

Callback function which will be triggered when the widget loses focus.

Parameters :
Name Type Optional Description
$event MouseEvent No

DOM event on which call back is triggered

widget any No

Instance of the search widget

Returns : void
onChange
onChange($event: MouseEvent, widget: any, newVal: any, oldVal: any)

Callback function which will be triggered when the widget is clicked or when datavalue has changed.

Parameters :
Name Type Optional Description
$event MouseEvent No

DOM event on which call back is triggered

widget any No

Instance of the search widget

newVal any No

datavalue of the search widget

oldVal any No

previously selected datavalue of the search widget

Returns : void
onFocus
onFocus($event: MouseEvent, widget: any)

Callback function which will be triggered when the widget gets focused.

Parameters :
Name Type Optional Description
$event MouseEvent No

DOM event on which call back is triggered

widget any No

Instance of the search widget

Returns : void
onSelect
onSelect($event: MouseEvent, widget: any, selectedValue: any)

Callback function which will be triggered on selecting a item from the search results.

Parameters :
Name Type Optional Description
$event MouseEvent No

DOM event on which call back is triggered

widget any No

Instance of the search widget

selectedValue any No

represents the datavalue of search widget.

Returns : void
onSubmit
onSubmit($event: MouseEvent, widget: any)

Callback function which will be triggered on the search submit.

Parameters :
Name Type Optional Description
$event MouseEvent No

DOM event on which call back is triggered

widget any No

Instance of the search widget

Returns : void

Inputs

class

Class of the widget.

Type : string

datacompletemsg

This message will be displayed when there is no more data to load.

Type : string

Default value : 'No more data to load'

datafield

This property sets the dataValue to be returned by the search widget when the list is populated using the dataSet property.

Type : string

dataset

This property accepts the options to create the search widget. These options can be array of values, array of objects, object containing key-value pairs.

Bindable: true

Type : Array<any> | Object

datavalue

This property defines the initial selected value of the search widget.
This cannot accept an array of values.

Bindable: true

Type : any

disabled

This property will be used to disable the search widget. If the disabled property is true (checked), the widget becomes display-only.

Bindable: true

Type : boolean

displayimagesrc

Picture source sets the image to be displayed in the search results.

Bindable: true

Type : string

displaylabel

This property sets the displayValue to show in the search widget when the list is populated using the dataSet property.

Bindable: true

Type : string

dropup

This property sets the typeahead dropdown position. If set to true, dropdown will be shown above the input. By default dropup is false
To apply the dropup, include dropup="true" on the search widget markup.

Type : boolean

hint

Hint text is shown for the search widget on hover.

Bindable: true

Type : string

imagewidth

Picture width property allows to set the width of the picture.

Type : string

Default value : '16px'

limit

This property limits the search results to be displayed in the widget

Type : number

loadingdatamsg

This message will be displayed when waiting for data to load.

Type : string

Default value : 'Loading items...'

minchars

The minchars attribute specifies the number of characters that need to be entered before the query is triggered. It must be greater than or equal to 0.

Type : number

name

Name of the search widget.

Type : string

orderby

Allows to display the data in asc or desc order based on this property

Type : string

placeholder

The placeholder for the search box.

Bindable: true

Type : string

query

This property contains the entered text in the search input.

Type : string

readonly

This property will be used to make the search widget non-editable.

Bindable: true

Type : boolean

required

This property will be used to validate the state of the search widget when used inside a form widget.

Bindable: true

Type : boolean

searchkey

This is the property to be searched upon, in the list object

Type : string

shortcutkey

The shortcut key property specifies a shortcut key to activate/focus an element.

Type : string

show

This property will be used to show/hide the search widget.

Bindable: true

Type : boolean

Default value : true

showsearchicon

This property shows the search icon when set to true. This value is false for autocomplete.

Type : boolean

tabindex

This property specifies the tab order of the search widget.

Type : number

Default value : 0

type

This property specifies type of search.

Allowed Values: search, autocomplete

search: Atleast one character has to be entered to trigger the search query.

autocomplete: automatically triggers the query when the search is focused.

Type : string

Default value : 'search'

result-matching ""

    No results matching ""