File

projects/components/widgets/basic/search/src/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
Type : string

Class of the widget.

datacompletemsg
Type : string
Default value : 'No more data to load'

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

datafield
Type : string

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

dataset
Type : Array<any> | Object

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

datavalue
Type : any

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

Bindable: true

disabled
Type : boolean

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

Bindable: true

displayimagesrc
Type : string

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

Bindable: true

displaylabel
Type : string

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

Bindable: true

dropup
Type : boolean

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.

hint
Type : string

Hint text is shown for the search widget on hover.

Bindable: true

imagewidth
Type : string
Default value : '16px'

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

limit
Type : number

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

loadingdatamsg
Type : string
Default value : 'Loading items...'

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

minchars
Type : number

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.

name
Type : string

Name of the search widget.

orderby
Type : string

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

placeholder
Type : string

The placeholder for the search box.

Bindable: true

query
Type : string

This property contains the entered text in the search input.

readonly
Type : boolean

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

Bindable: true

required
Type : boolean

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

Bindable: true

searchkey
Type : string

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

shortcutkey
Type : string

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

show
Type : boolean
Default value : true

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

Bindable: true

showsearchicon
Type : boolean

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

tabindex
Type : number
Default value : 0

This property specifies the tab order of the search widget.

type
Type : string
Default value : 'search'

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.

results matching ""

    No results matching ""