projects/i-components/src/lib/components/auto-complete-box/auto-complete-box.component.ts
Angular Component for the AutoCompleteBox Control.
selector | wm-auto-complete-box |
styleUrls | ./auto-complete-box.component.scss |
templateUrl | ./auto-complete-box.component.html |
constructor(injectedModel: AutoCompleteBoxModel, cdRef: ChangeDetectorRef, injector: Injector)
|
||||||||||||
Creates an instance of AutoCompleteBoxComponent.
Parameters :
|
filterMode | |
Type : string
|
|
Gets or sets how the text in the text input is used to filter items specified by the ItemsSource property for display in the drop-down. |
isTextCompletionEnabled | |
Type : boolean
|
|
Sets the flag that indicates whether the match found during the filtering process will be displayed automatically in the text box. |
itemFilter | |
Type : function
|
|
Gets or sets a custom item filter function that will be called when filtering elements. |
itemsSource | |
Gets or sets a collection that is used to generate the items for the drop-down portion of the AutoCompleteBox control. |
itemTemplate | |
Gets or sets the Template used to display each item in the drop-down portion of the control. |
minimumPopulateDelay | |
Type : number
|
|
Gets or sets the minimum delay, in milliseconds, after text is typed in the text input before the AutoCompleteBox control populates the list of possible matches in the drop-down. |
minimumPrefixLength | |
Type : number
|
|
Gets or sets the minimum number of characters required to be entered in the text input before the AutoCompleteBox displays possible matches. |
model | |
Type : AutoCompleteBoxModel
|
|
Current model |
selectedItem | |
Gets or sets the selected item in the drop-down. |
templateItem | |
Type : any
|
|
Default value : null
|
|
Item template to render when templates are added as children |
text | |
string used in the text property of the AutoCompleteBox |
valueMember | |
Type : string
|
|
Gets or sets the Binding that is used to get the value for display in the text box portion of the AutoCompleteBox control, and to filter items for display in the drop-down. |
valueMemberBinding | |
Gets or sets the Binding that is used to get the value for display in the text box portion of the AutoCompleteBox control, and to filter items for display in the drop-down. |
valueMemberPath | |
Type : string
|
|
Sets the Binding that is used to get the value for display in the text box portion of the AutoCompleteBox control, and to filter items for display in the drop-down. |
controlTemplate | |
Type : any
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1197
|
|
Sets the controlTemplate Input property for changing the model's |
cursor | |
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1451
|
|
Property used to save the cursor value |
dataContext | |
Type : any
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:952
|
|
Gets/sets the dataContext Input property for changing the model's |
dataGridRowHeight | |
Type : number
|
|
Default value : 22
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:507
|
|
Represents the row height of both the DataGrid and XamGrid components it affects the css and also an internal function that virtualized data, so do not change directly on css, use this variable instead. |
foreground | |
Type : any
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1223
|
|
Sets the value of the Foreground property |
height | |
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1394
|
|
Sets the height |
horizontalAlignment | |
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1096
|
|
Sets the horizontal alignment. |
horizontalContentAlignment | |
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1125
|
|
Sets the horizontal content alignment. |
hostHozSelfAlign | |
Type : boolean
|
|
Default value : false
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:380
|
|
Applies horizontal selfalign class. Flags indicates when the control should handle its own horizontal alignment and ignore container alignment. |
isEnabled | |
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1008
|
|
Gets/sets the isEnabled property for the BaseComponent |
isTabStop | |
Type : boolean
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:760
|
|
Sets/gets IsTabStop property of the BaseComponent |
margin | |
Type : string
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:782
|
|
Sets Margin property of the BaseComponent. |
maxHeight | |
Type : any
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1325
|
|
Sets maxHeight |
maxWidth | |
Type : any
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1283
|
|
Sets maxWidth |
minHeight | |
Type : any
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1304
|
|
Sets minHeight |
minWidth | |
Type : any
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1262
|
|
Sets min Width |
name | |
Type : string
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1153
|
|
Sets the name model property for the control when the name is an input |
opacity | |
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1336
|
|
Sets Opacity value property of the component |
spellCheck | |
Type : boolean
|
|
Default value : false
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:186
|
|
Flag to determinate if the component should do the spell check or not. Default value is false. |
style | |
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1434
|
|
Sets the style |
tabIndex | |
Type : number
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:733
|
|
Sets the property TabIndex of the control model. |
tag | |
Type : any
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1171
|
|
Object used in the Tag property of the Button |
useCss | |
Type : boolean
|
|
Default value : false
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:177
|
|
Determines if the component uses CSS height/width values, instead of inputs |
verticalAlignment | |
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1038
|
|
Sets the vertical alignment. |
verticalContentAlignment | |
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1067
|
|
Sets the vertical content alignment. |
visibility | |
Type : any
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:980
|
|
Gets/sets the visibility property for the BaseComponent |
width | |
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1365
|
|
Sets the width |
zindex | |
Type : number
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:1498
|
|
Property used to set the canvas zindex value. Note: Consider moving this @Input to canvas.direcive.ts, refactoring the directive so all inputs are declared in the directive, and all @HostBindings are declared here in baseComponent, the directive would be responsible for updating the models, while baseComponent will be responsible for binding the values: zIndex, Top, Left... |
dropDownClosed | |
Type : EventEmitter<literal type>
|
|
Dropdown closed event. |
bindingValidationError | |
Type : EventEmitter<any>
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:114
|
|
output to emit the new value of the bindingValidationError event |
layoutUpdated | |
Type : EventEmitter<any>
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:140
|
|
Output to emit when then component's layout is updated. |
loaded | |
Type : EventEmitter<any>
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:123
|
|
Output to emit when then component is loaded. |
mouseEnter | |
Type : EventEmitter<literal type>
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:157
|
|
Event Emitter. EventEmitter normally called in the mouseEnterHandler. |
mouseLeave | |
Type : EventEmitter<literal type>
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:167
|
|
Event Emitter Called in the mouseLeave handler |
mouseLeftButtonUp | |
Type : EventEmitter<literal type>
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:147
|
|
MouseLeftButtonUp event Emitter. |
sizeChanged | |
Type : EventEmitter<any>
|
|
Inherited from
BaseComponent
|
|
Defined in
BaseComponent:132
|
|
Output to emit when then component size is changed. |
class |
Type : string
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:407
|
Applies custom CSS classes |
class.defaultFontStyles |
Type : boolean
|
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:398
|
Applies default font styles class, used to allow specificity for each control css |
class.focusable |
Type : boolean
|
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:388
|
Display if the component is focusable or not |
class.hasDefinedCursor |
Type : boolean
|
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:415
|
Applies Defined Cursor class |
class.horizontal-center |
Type : boolean
|
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:308
|
Applies horizontal alignment left class |
class.horizontal-left |
Type : boolean
|
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:298
|
Applies horizontal alignment left class |
class.horizontal-right |
Type : boolean
|
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:368
|
Applies horizontal alignment right class |
class.horizontal-stretch |
Type : boolean
|
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:358
|
Applies horizontal alignment stretch class |
class.vertical-bottom |
Type : boolean
|
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:328
|
Applies vertical alignment bottom class |
class.vertical-center |
Type : boolean
|
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:338
|
Applies vertical alignment center class |
class.vertical-stretch |
Type : boolean
|
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:318
|
Applies horizontal alignment stretch class |
class.vertical-top |
Type : boolean
|
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:348
|
Applies vertical alignment top class |
style.display |
Type : any
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:243
|
Property use it to apply the host binding for the visibility |
style.font-family |
Type : any
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:261
|
Property use it to apply the host binding for the font-family |
style.font-size |
Type : any
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:270
|
Property use it to apply the host binding for the font-size |
style.font-style |
Type : any
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:279
|
Property use it to apply the host binding for the font-style |
style.font-weight |
Type : any
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:288
|
Property use it to apply the host binding for the font-weight |
style.height |
Type : string
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:218
|
Property use it to apply the host binding for the height |
style.max-height.px |
Type : number
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:234
|
Property used to apply the host binding for max-height |
style.max-width.px |
Type : number
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:210
|
Property used to apply the host binding for max-width |
style.min-height.px |
Type : number
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:226
|
Property used to apply the host binding for min-height |
style.min-width.px |
Type : number
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:202
|
Property used to apply the host binding for min-width |
style.opacity |
Type : any
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:252
|
Property use it to apply the host binding for the opacity |
style.width |
Type : string
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:194
|
Property use it to apply the host binding for the width |
style.z-index |
Type : string
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:424
|
Sets the z-index style. |
assignItemTemplate |
assignItemTemplate()
|
Assign the item template
Returns :
void
|
handleSelection | ||||||
handleSelection(event: any)
|
||||||
Emitted when item selection is changing, before the selection completes
Parameters :
Returns :
void
|
Private isAlphabeticKey | ||||||
isAlphabeticKey(event: any)
|
||||||
Indicathes wither the given key event corresponds to a alphabet key or not
Parameters :
Returns :
boolean
true if the key is a valid alphabet key, false otherwise |
modelChangeHandler | ||||||
modelChangeHandler(name: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:327
|
||||||
DropDownOpened
Parameters :
Returns :
void
|
ngAfterViewInit |
ngAfterViewInit()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:195
|
Angular lifecycle.
Returns :
void
|
ngOnInit |
ngOnInit()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:179
|
Angular lifecycle
Returns :
void
|
onDropDownClosedHandler |
onDropDownClosedHandler()
|
Emitted before the dropdown is closed
Returns :
void
|
onDropDownOpenedHandler |
onDropDownOpenedHandler()
|
Emitted after the dropdown is opened
Returns :
void
|
onInputKeyUpHandler | ||||||
onInputKeyUpHandler(event: any)
|
||||||
Event that occurs on a key up while the editor is in edit mode and the editor has focus
Parameters :
Returns :
void
|
Private setSearchText | ||||||
setSearchText(value: string)
|
||||||
Sets the text that is used to filter items in the ItemsSource list.
Parameters :
Returns :
void
|
Private updateSelectionOnKey |
updateSelectionOnKey()
|
Process the selection when a new key has been typed in the input box. Processing the key includes narrowing the search, clearing the current selection and autoclosing the dropdown
Returns :
void
|
Protected alignmentHandler |
alignmentHandler()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:2346
|
Calculate the values for the grid size behavior from the alignments
Returns :
void
|
Protected assignPendingPropertyValues |
assignPendingPropertyValues()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:2057
|
Apply pending assignments to properties with property values
Returns :
void
|
calculateActualSize | ||||||||
calculateActualSize(name?: string)
|
||||||||
Inherited from
BaseComponent
|
||||||||
Defined in
BaseComponent:1674
|
||||||||
If the name is equal to 'calculateActualSize', then call the handlerCalcActualSize function and pass in false to avoid the timer in the function. memberof BaseComponent
Parameters :
Returns :
void
|
Protected checkAndRegisterCompatibilityBinding | |||||||||
checkAndRegisterCompatibilityBinding(property: DependencyProperty, bindingObjectCandidate: any)
|
|||||||||
Inherited from
BaseComponent
|
|||||||||
Defined in
BaseComponent:2023
|
|||||||||
Verifies if the given object (bindingObjectCandidate) is a binding object. If so the binding will be registered.
Parameters :
Returns :
boolean
{boolean} true if the value is a binding info object and if the binding was registered, false if not |
Protected checkForStaticResource | ||||||||||||
checkForStaticResource(property: string, value: any)
|
||||||||||||
Inherited from
BaseComponent
|
||||||||||||
Defined in
BaseComponent:2043
|
||||||||||||
Checks if the given value is a static resource reference or not, if a reference then the value is queue for later assignment.
Parameters :
Returns :
boolean
true if the value is a static resource reference, otherwise false |
checkStaticItemInModelCollection | ||||||||||||
checkStaticItemInModelCollection(collection: any, itemToCheck: any)
|
||||||||||||
Inherited from
BaseComponent
|
||||||||||||
Defined in
BaseComponent:1889
|
||||||||||||
Checks if the element exists previously in the items collection
Parameters :
Returns :
number
number Returns -1 if the item is not present in the items collection otherwise the index value |
createElementInRoot |
createElementInRoot(injector: Injector, componentToCreate: any)
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:2698
|
Create a given component on the HTML body.
Returns :
ComponentRef<any>
|
cursorStyle |
cursorStyle()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:1549
|
Returns the correct CSS cursor style and sets the definedCursor flag if necessary
Returns :
string
{string} |
detectChanges |
detectChanges()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:813
|
Performs a single detect Changes over the component
Returns :
void
|
detectChangesAction |
detectChangesAction()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:1686
|
Handle subscription to the notifyDetectChanges action Refresh the component whenever a model modification was performed
Returns :
void
|
getForeground |
getForeground()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:1966
|
Calculates the Foreground color to be applied
Returns :
string
string |
getImageString | ||||||
getImageString(value: any)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:2221
|
||||||
Returns string path to the image.
Parameters :
Returns :
any
|
getTargetValue | ||||||
getTargetValue(e: Event)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:2239
|
||||||
Returns the value from a $event
Parameters :
Returns :
string
|
Protected handlerCalcActualSize | ||||||
handlerCalcActualSize(async: boolean)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:2391
|
||||||
Handler that calculates ActualHeight & ActualWidth based on its inner content.
Parameters :
Returns :
void
|
heightCalc |
heightCalc()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:1939
|
Applies the height CSS value
Returns :
any
|
heightDefaultStyle |
heightDefaultStyle()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:1914
|
Calculates the auto height value
Returns :
string
{string} |
Protected hostHorizontalAlignmentCall |
hostHorizontalAlignmentCall()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:2374
|
Assign all the horizontal bindings for the control
Returns :
void
|
Protected hostVerticalAlignmentCall |
hostVerticalAlignmentCall()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:2357
|
Assign all the vertical bindings for the control
Returns :
void
|
imageToPath | ||||||
imageToPath(value: any)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:2202
|
||||||
Returns the path of the given image.
Parameters :
Returns :
any
|
loadStaticItems | ||||||||||||
loadStaticItems(staticItems: any, itemsCollection: any)
|
||||||||||||
Inherited from
BaseComponent
|
||||||||||||
Defined in
BaseComponent:1634
|
||||||||||||
Parameters :
Returns :
void
void |
Private markForCheckComp |
markForCheckComp()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:2451
|
Marks current component
Returns :
void
|
mouseEnterHandler | ||||||||
mouseEnterHandler(event: any)
|
||||||||
Inherited from
BaseComponent
|
||||||||
Defined in
BaseComponent:1982
|
||||||||
Event Handler for when the mouse enter the Image component.
Parameters :
Returns :
void
|
mouseLeaveHandler | ||||||||
mouseLeaveHandler(event: any)
|
||||||||
Inherited from
BaseComponent
|
||||||||
Defined in
BaseComponent:2001
|
||||||||
Event Handler for when the mouse enter the Image component.
Parameters :
Returns :
void
|
Public ngAfterContentChecked |
ngAfterContentChecked()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:867
|
Angular Lifecycle Hooks
Returns :
void
|
Public ngAfterContentInit |
ngAfterContentInit()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:857
|
Angular Lifecycle Hooks
Returns :
void
|
Public ngAfterViewChecked |
ngAfterViewChecked()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:893
|
Angular Lifecycle Hooks
Returns :
void
|
Public ngDoCheck |
ngDoCheck()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:847
|
Angular Lifecycle Hooks
Returns :
void
|
Public ngOnChanges |
ngOnChanges()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:824
|
Angular Lifecycle Hooks
Returns :
void
|
Public ngOnDestroy |
ngOnDestroy()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:906
|
Cleanup operations for base component
Returns :
void
|
preventItemsDuplication | ||||||||||||||||||
preventItemsDuplication(itemsToRender: any, items: any, contentChildTemplate: any, afterContentInitCalled: boolean, injector: Injector)
|
||||||||||||||||||
Inherited from
BaseComponent
|
||||||||||||||||||
Defined in
BaseComponent:2170
|
||||||||||||||||||
Validates if coming models are the same, and prevents to be recreated on Ribbon DOM. (Needs to be checked, in some statics scenarios RibbonTab, RibbonGroup duplicates items)
Parameters :
Returns :
any[]
|
processAlignments | ||||||
processAlignments(name: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:1704
|
||||||
Method to check if the component should assign a alignment property
Parameters :
Returns :
void
{void} |
processCursor | ||||||
processCursor(name: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:1850
|
||||||
Method to set the cursor style of the component
Parameters :
Returns :
void
|
processCustomCssClasses | ||||||
processCustomCssClasses(name: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:1723
|
||||||
Method to set custom CSS Clases
Parameters :
Returns :
void
{void} |
processFocusable | ||||||
processFocusable(name: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:1816
|
||||||
Method to check and set the height of the grid
Parameters :
Returns :
void
|
Private processFontFamily | ||||||
processFontFamily(name: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:2784
|
||||||
Process the FontFamily property
Parameters :
Returns :
any
|
processFonts | ||||||
processFonts(name: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:1778
|
||||||
Method to apply the font styles for the component.
Parameters :
Returns :
void
|
Private processFontSize | ||||||
processFontSize(name: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:2798
|
||||||
Process the FontSize property
Parameters :
Returns :
any
|
Private processFontStyle | ||||||
processFontStyle(name: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:2815
|
||||||
Process the FontStyle property
Parameters :
Returns :
any
|
Private processFontWeight | ||||||
processFontWeight(name: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:2832
|
||||||
Process the FontWeight property
Parameters :
Returns :
any
|
processHeights | ||||||
processHeights(name: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:1797
|
||||||
Method to check and set the height of the grid
Parameters :
Returns :
void
|
processIsEnabled | ||||||
processIsEnabled(name: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:1764
|
||||||
Process changes to
Parameters :
Returns :
void
|
processOpacity | ||||||
processOpacity(name: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:1751
|
||||||
Method to apply the opacity for the component.
Parameters :
Returns :
void
|
processVisibility | ||||||
processVisibility(name: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:1737
|
||||||
Method to check if the component should be show or hide.
Parameters :
Returns :
void
|
processWidths | ||||||
processWidths(name: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:1829
|
||||||
Method to check and set the width of the grid
Parameters :
Returns :
void
|
Private processZIndex | ||||||
processZIndex(name: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:1872
|
||||||
Method to process the ZIndex when set through the model
Parameters :
Returns :
void
|
Private recreateInvalidBindings |
recreateInvalidBindings()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:2756
|
Execution of removeModelProxyHandlers in a previous instance of the component (that used the same model) could have set some bindings in an invalid state, this will check if some of them has to be recreated
Returns :
void
|
Private registerContextMenuActions | ||||||
registerContextMenuActions(ctxMenu: ContextMenuManager)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:2533
|
||||||
Enable the contextMenu actions to be displayed when the user perform an action Creates dinamically a new instance of XamContextMenu to be displayed in the screen
Parameters :
Returns :
void
|
Protected registerDomEventListenerOnElement |
registerDomEventListenerOnElement(eventName: string, handler: any)
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:2316
|
Registers a DOM handler on the current element
Returns :
void
|
Protected registerHandler | |||||||||
registerHandler(event: SubscriptionEvent<void>, arrowHandler: (s: any,a: any) => void)
|
|||||||||
Inherited from
BaseComponent
|
|||||||||
Defined in
BaseComponent:2298
|
|||||||||
Register arrow handler into the given
Parameters :
Returns :
void
|
Protected registerMouseEvents |
registerMouseEvents()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:2272
|
Registers mouse events if required
Returns :
void
|
Protected registerObservers | ||||||||||||
registerObservers(emitter: EventEmitter
|
||||||||||||
Inherited from
BaseComponent
|
||||||||||||
Defined in
BaseComponent:2252
|
||||||||||||
Register observers from the given
Parameters :
Returns :
void
|
Private registerToolTip | |||||||||
registerToolTip(element: ElementRef
|
|||||||||
Inherited from
BaseComponent
|
|||||||||
Defined in
BaseComponent:2607
|
|||||||||
Registers a tooltip to a component
Parameters :
Returns :
void
|
Private removeModelProxyHandlers |
removeModelProxyHandlers()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:2738
|
Clean up the handlers when the component is destroyed
Returns :
void
|
Private setComponentForDirectives |
setComponentForDirectives()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:2512
|
Sets an internal reference through the element ref to access the component in a directive
Returns :
void
|
Protected setPendingPropertyValue |
setPendingPropertyValue(property: string, value: any)
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:2336
|
Stores the pending property values for instance attach properties. Which will be applied when the model is available
Returns :
void
|
setupDependencyComponents | ||||||
setupDependencyComponents(model: FrameworkElement)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:1612
|
||||||
Adds the references to the dependency components
Parameters :
Returns :
void
|
setupModel | ||||||
setupModel(model: FrameworkElement)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:1559
|
||||||
Syncs the modelProxy with model
Parameters :
Returns :
void
void |
Private syncToolTip | ||||||
syncToolTip(tooltip: ToolTipModel)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:2587
|
||||||
Updates the tooltip associated to a component
Parameters :
Returns :
void
|
Private syncValidationError | ||||||
syncValidationError(name?: string)
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:2766
|
||||||
Syncs validation information with component properties
Parameters :
Returns :
void
|
Private tabSelectionSubscription |
tabSelectionSubscription()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:2471
|
Subscribe to the tabhandler event if Required When the component is inside a tab control it should trigger the load event every time the tab is selected
Returns :
void
|
trackByFn | ||||||||||||
trackByFn(index: any, item: any)
|
||||||||||||
Inherited from
BaseComponent
|
||||||||||||
Defined in
BaseComponent:1904
|
||||||||||||
Function used by Angular to track elements in the ngFor directive. We use the GUID property to compare elements.
Parameters :
Returns :
any
{*} -return the model or object itself |
Private unregisterToolTip | ||||||
unregisterToolTip(element: ElementRef
|
||||||
Inherited from
BaseComponent
|
||||||
Defined in
BaseComponent:2719
|
||||||
Unregisters a tooltip to a component
Parameters :
Returns :
void
|
Private updateSizePropertiesForActualSizeChange | ||||||||
updateSizePropertiesForActualSizeChange(element: Element)
|
||||||||
Inherited from
BaseComponent
|
||||||||
Defined in
BaseComponent:2421
|
||||||||
Updates the size properties of the component based on the initial size change
Parameters :
Returns :
void
|
validatesLoadingFlag |
validatesLoadingFlag()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:1519
|
Validates loading flag for components outside current tab index TabIndexService should be only tabItem provider, and when currentTabId is different from selectedTab IsFirstTimeLoad is set to false because tabService is going to be one in charge to trigger only one time when tab changes.
Returns :
void
|
widthCalc |
widthCalc()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:1953
|
Applies the width CSS value
Returns :
any
|
widthDefaultStyle |
widthDefaultStyle()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:1926
|
Calculates the auto width value
Returns :
string
{string} |
Private delayFlag |
Default value : false
|
Flag that controls when the user types in the autocompeltebox while the timer for MinimumPopulateDelay is running |
Private delayTimer |
Default value : undefined
|
Timer that manages MinimumPopulateDelay |
Public dropdownAutoComplete |
Type : IgxDropDownComponent
|
Decorators :
@ViewChild('dynamicAutoComplete')
|
Dropdown in the AutoCompleteBox component |
Private dropDownChanged |
Type : boolean
|
Flag to handle changed by user action |
dropDownClosed |
Type : EventEmitter<literal type>
|
Default value : new EventEmitter()
|
Decorators :
@Output()
|
Dropdown closed event. |
Public inputAutoComplete |
Type : ElementRef
|
Decorators :
@ViewChild('inputAutoComplete', {static: true})
|
Input in the AutoCompleteBox component |
isInitialized |
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:125
|
Flag to know if the component is ready to render |
Public itemsTemplate |
Type : QueryList<any>
|
Decorators :
@ContentChildren('itemTemplate')
|
Template elements reference |
model |
Type : AutoCompleteBoxModel
|
Decorators :
@Input()
|
Current model |
Protected modelProxy |
Type : AutoCompleteBoxModel
|
Default value : ModelProxy.create<AutoCompleteBoxModel>()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:134
|
ModelProxy is copy of model, used on the component initial building to prevent crashes with external bindings. |
Public templateItem |
Type : null
|
Default value : null
|
Decorators :
@Input()
|
Item template to render when templates are added as children |
actualSizeCalled |
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:481
|
Flag to know if the Angular event was called |
afterContentInitCalled |
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:465
|
Flag to know if the Angular event was called |
afterViewCheckedCalled |
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:473
|
Flag to know if the Angular event was called |
afterViewInitCalled |
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:457
|
Flag to know if the Angular event was called |
Private bindingValidationCallback |
Type : function
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:618
|
Callback for binding validation |
bindingValidationError |
Type : EventEmitter<any>
|
Default value : new EventEmitter()
|
Decorators :
@Output()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:114
|
output to emit the new value of the bindingValidationError event |
Private cdRefInjection |
Type : ChangeDetectorRef
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:659
|
Change Detector Reference for the component |
Private changeDetectionTimer |
Type : any
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:668
|
A timer to debounce changedetection actions |
Protected changeDetectorNotifier |
Type : ChangeDectionNotifierService
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:576
|
Change Detection Notifier Service instace. |
Private contextMenuUnlistener |
Type : function
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:676
|
Context Menu event unlisten action. |
Private ctxMenuInstance |
Type : any
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:630
|
Reference to the ctxMenuInstance |
customCssClasses |
Type : string
|
Default value : null
|
Decorators :
@HostBinding('class')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:407
|
Applies custom CSS classes |
Private customTooltipInstance |
Type : any
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:641
|
Reference to the custom tooltip instance this is used to render a popup with custom elements used when the content value is not a string |
dataGridRowHeight |
Type : number
|
Default value : 22
|
Decorators :
@Input()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:507
|
Represents the row height of both the DataGrid and XamGrid components it affects the css and also an internal function that virtualized data, so do not change directly on css, use this variable instead. |
Protected domHandlerUnListeners |
Type : Array<void>
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:567
|
A collection (possible undefined) of DOM unlistener functions . That is, functions to de register handlers |
fireLoadedSubscription |
Type : Subscription
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:449
|
Flag to control load event for components inside tab control |
focusable |
Default value : false
|
Decorators :
@HostBinding('class.focusable')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:388
|
Display if the component is focusable or not |
Protected handlersToUnregister |
Type : Array<>
|
Default value : []
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:558
|
handlers to unregister when the component is destroyed |
hasDefinedCursor |
Default value : false
|
Decorators :
@HostBinding('class.hasDefinedCursor')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:415
|
Applies Defined Cursor class |
hostFontFamily |
Type : any
|
Default value : null
|
Decorators :
@HostBinding('style.font-family')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:261
|
Property use it to apply the host binding for the font-family |
hostFontSize |
Type : any
|
Default value : null
|
Decorators :
@HostBinding('style.font-size')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:270
|
Property use it to apply the host binding for the font-size |
hostFontStyle |
Type : any
|
Default value : null
|
Decorators :
@HostBinding('style.font-style')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:279
|
Property use it to apply the host binding for the font-style |
hostFontStyles |
Default value : false
|
Decorators :
@HostBinding('class.defaultFontStyles')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:398
|
Applies default font styles class, used to allow specificity for each control css |
hostFontWeight |
Type : any
|
Default value : null
|
Decorators :
@HostBinding('style.font-weight')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:288
|
Property use it to apply the host binding for the font-weight |
hostHeight |
Type : string
|
Default value : null
|
Decorators :
@HostBinding('style.height')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:218
|
Property use it to apply the host binding for the height |
hostHozCenter |
Default value : false
|
Decorators :
@HostBinding('class.horizontal-center')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:308
|
Applies horizontal alignment left class |
hostHozLeft |
Default value : false
|
Decorators :
@HostBinding('class.horizontal-left')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:298
|
Applies horizontal alignment left class |
hostHozRight |
Default value : false
|
Decorators :
@HostBinding('class.horizontal-right')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:368
|
Applies horizontal alignment right class |
hostHozSelfAlign |
Default value : false
|
Decorators :
@HostBinding('class.horizontal-selfalign')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:380
|
Applies horizontal selfalign class. Flags indicates when the control should handle its own horizontal alignment and ignore container alignment. |
hostHozStretch |
Default value : false
|
Decorators :
@HostBinding('class.horizontal-stretch')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:358
|
Applies horizontal alignment stretch class |
hostMaxHeight |
Type : number
|
Decorators :
@HostBinding('style.max-height.px')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:234
|
Property used to apply the host binding for max-height |
hostMaxWidth |
Type : number
|
Decorators :
@HostBinding('style.max-width.px')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:210
|
Property used to apply the host binding for max-width |
hostMinHeight |
Type : number
|
Decorators :
@HostBinding('style.min-height.px')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:226
|
Property used to apply the host binding for min-height |
hostMinWidth |
Type : number
|
Decorators :
@HostBinding('style.min-width.px')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:202
|
Property used to apply the host binding for min-width |
hostOpacity |
Type : any
|
Default value : null
|
Decorators :
@HostBinding('style.opacity')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:252
|
Property use it to apply the host binding for the opacity |
hostVerBottom |
Default value : false
|
Decorators :
@HostBinding('class.vertical-bottom')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:328
|
Applies vertical alignment bottom class |
hostVerCenter |
Default value : false
|
Decorators :
@HostBinding('class.vertical-center')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:338
|
Applies vertical alignment center class |
hostVerStretch |
Default value : false
|
Decorators :
@HostBinding('class.vertical-stretch')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:318
|
Applies horizontal alignment stretch class |
hostVerTop |
Default value : false
|
Decorators :
@HostBinding('class.vertical-top')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:348
|
Applies vertical alignment top class |
hostVisibility |
Type : any
|
Default value : null
|
Decorators :
@HostBinding('style.display')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:243
|
Property use it to apply the host binding for the visibility |
hostWidth |
Type : string
|
Default value : null
|
Decorators :
@HostBinding('style.width')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:194
|
Property use it to apply the host binding for the width |
hostZIndex |
Type : string
|
Default value : null
|
Decorators :
@HostBinding('style.z-index')
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:424
|
Sets the z-index style. |
isInternalInherit |
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:515
|
Flag which indicates that the component is an internal use for inheritance |
layoutUpdated |
Type : EventEmitter<any>
|
Default value : new EventEmitter()
|
Decorators :
@Output()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:140
|
Output to emit when then component's layout is updated. |
loaded |
Type : EventEmitter<any>
|
Default value : new EventEmitter()
|
Decorators :
@Output()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:123
|
Output to emit when then component is loaded. |
Protected modelChangeRef |
Type : function
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:601
|
Contains the reference of the function added for handle the model's change |
mouseEnter |
Type : EventEmitter<literal type>
|
Default value : new EventEmitter()
|
Decorators :
@Output()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:157
|
Event Emitter. EventEmitter normally called in the mouseEnterHandler. |
mouseLeave |
Type : EventEmitter<literal type>
|
Default value : new EventEmitter()
|
Decorators :
@Output()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:167
|
Event Emitter Called in the mouseLeave handler |
Private mouseLeaveTooltipUnlistener |
Type : function
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:684
|
Mouse over event for tooltip unlisten action. |
mouseLeftButtonUp |
Type : EventEmitter<literal type>
|
Default value : new EventEmitter<any>()
|
Decorators :
@Output()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:147
|
MouseLeftButtonUp event Emitter. |
Private mouseMoveTooltipUnlistener |
Type : function
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:701
|
Mouse move event for tooltip unlisten action. This should have a short lifespan, as much as it takes for the tooltip to be shown |
Private mouseOverTooltipUnlistener |
Type : function
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:692
|
Mouse over event for tooltip unlisten action. |
Protected ngZone |
Type : NgZone
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:585
|
Angular´s NgZone accessor |
Protected pendingDependencyPropertyValue |
Type : Array<>
|
Default value : []
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:549
|
A collection of pending dependency properties values to assign to the model |
Protected pendingSetValues |
Type : Array<>
|
Default value : []
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:540
|
A collection of pending values to assign to the model |
Protected renderer2 |
Type : Renderer2
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:594
|
Angular´s Renderer2 |
sizeChanged |
Type : EventEmitter<any>
|
Default value : new EventEmitter()
|
Decorators :
@Output()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:132
|
Output to emit when then component size is changed. |
Private sizeChangedPendingTimeout |
Type : any
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:610
|
Timeout id for triggering the sizechanged event |
spellCheck |
Default value : false
|
Decorators :
@Input()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:186
|
Flag to determinate if the component should do the spell check or not. Default value is false. |
staticContent |
Type : any
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:432
|
cache the static content of the control to validate if the current data is not equals. |
tabSubscription |
Type : Subscription
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:440
|
TabSelection event subscription |
Private tooltipMousePosition |
Type : DOMRect
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:710
|
To track the position of the mouse while the tooltip is being displayed |
Private toolTipTimeout |
Type : any
|
Default value : null
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:650
|
To control the timer to show the tooltip |
useCss |
Default value : false
|
Decorators :
@Input()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:177
|
Determines if the component uses CSS height/width values, instead of inputs |
validationError |
Default value : false
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:488
|
Property to set the validationError class in the component |
validationErrorMessage |
Type : string
|
Default value : ''
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:496
|
Property for specifying validation error message |
isDropDownOpen | ||||||
getisDropDownOpen()
|
||||||
Gets a value that indicates whether the drop-down portion of the control is open
Returns :
boolean
|
||||||
setisDropDownOpen(value: boolean)
|
||||||
Sets a value that indicates whether the drop-down portion of the control is open
Parameters :
Returns :
void
|
isTextCompletionEnabled | ||||||
getisTextCompletionEnabled()
|
||||||
Gets the flag that indicates whether the match found during the filtering process will be displayed automatically in the text box.
Returns :
boolean
|
||||||
setisTextCompletionEnabled(value: boolean)
|
||||||
Sets the flag that indicates whether the match found during the filtering process will be displayed automatically in the text box.
Parameters :
Returns :
void
|
searchText |
getsearchText()
|
Gets the text that is used to filter items in the ItemsSource list.
Returns :
string
|
selectedItem | ||||||
getselectedItem()
|
||||||
Return SelectedItem property
Returns :
unknown
|
||||||
setselectedItem(value: unknown | BindingInfo)
|
||||||
Gets or sets the selected item in the drop-down.
Parameters :
Returns :
void
|
itemsSource | ||||||
getitemsSource()
|
||||||
Return ItemsSource property
Returns :
Iterable | BindingInfo
|
||||||
setitemsSource(value: Iterable<unknown> | BindingInfo)
|
||||||
Gets or sets a collection that is used to generate the items for the drop-down portion of the AutoCompleteBox control.
Parameters :
Returns :
void
|
itemsToRender |
getitemsToRender()
|
Return ItemsSource property
Returns :
any[]
|
text | ||||||
gettext()
|
||||||
settext(value: string | BindingInfo)
|
||||||
string used in the text property of the AutoCompleteBox
Parameters :
Returns :
void
|
valueSelected | ||||||
getvalueSelected()
|
||||||
Gets the Text value property from the AutoCompleteBox.
Returns :
string
|
||||||
setvalueSelected(value: string)
|
||||||
Sets the Text value of the AutoCompleteBox.
Parameters :
Returns :
void
|
minimumPrefixLength | ||||||
getminimumPrefixLength()
|
||||||
setminimumPrefixLength(value: number)
|
||||||
Gets or sets the minimum number of characters required to be entered in the text input before the AutoCompleteBox displays possible matches.
Parameters :
Returns :
void
|
minimumPopulateDelay | ||||||
getminimumPopulateDelay()
|
||||||
setminimumPopulateDelay(value: number)
|
||||||
Gets or sets the minimum delay, in milliseconds, after text is typed in the text input before the AutoCompleteBox control populates the list of possible matches in the drop-down.
Parameters :
Returns :
void
|
filterMode | ||||||
getfilterMode()
|
||||||
setfilterMode(value: string)
|
||||||
Gets or sets how the text in the text input is used to filter items specified by the ItemsSource property for display in the drop-down.
Parameters :
Returns :
void
|
itemFilter | ||||||
getitemFilter()
|
||||||
setitemFilter(value: (search: any,item: any) => void)
|
||||||
Gets or sets a custom item filter function that will be called when filtering elements.
Parameters :
Returns :
void
|
valueMember | ||||||
getvalueMember()
|
||||||
setvalueMember(value: string)
|
||||||
Gets or sets the Binding that is used to get the value for display in the text box portion of the AutoCompleteBox control, and to filter items for display in the drop-down.
Parameters :
Returns :
void
|
valueMemberBinding | ||||||
getvalueMemberBinding()
|
||||||
setvalueMemberBinding(value: Binding | BindingInfo)
|
||||||
Gets or sets the Binding that is used to get the value for display in the text box portion of the AutoCompleteBox control, and to filter items for display in the drop-down.
Parameters :
Returns :
void
|
valueMemberPath | ||||||
getvalueMemberPath()
|
||||||
Gets the Binding that is used to get the value for display in the text box portion of the AutoCompleteBox control, and to filter items for display in the drop-down.
Returns :
string
|
||||||
setvalueMemberPath(value: string)
|
||||||
Sets the Binding that is used to get the value for display in the text box portion of the AutoCompleteBox control, and to filter items for display in the drop-down.
Parameters :
Returns :
void
|
itemTemplate | ||||||
getitemTemplate()
|
||||||
Return ItemsSource property
Returns :
DataTemplate | BindingInfo
|
||||||
setitemTemplate(value: DataTemplate | BindingInfo)
|
||||||
Gets or sets the Template used to display each item in the drop-down portion of the control.
Parameters :
Returns :
void
|
import {
AfterViewInit,
ChangeDetectorRef,
Component,
ContentChildren,
ElementRef,
EventEmitter,
Injector,
Input,
OnInit,
Optional,
Output,
QueryList,
ViewChild,
} from '@angular/core';
import {
AngularComponentId,
ComponentId,
AutoCompleteBoxModel,
AutoCompleteFilterMode,
Binding,
BindingInfo,
DataTemplate,
ModelProxy,
createBindingFromBindingInfo,
} from '@mobilize/wms-framework';
import { IgxDropDownComponent } from 'igniteui-angular';
import { BaseComponent } from '../base/base.component';
/**
* Angular Component for the AutoCompleteBox Control.
*
* @export
* @class AutoCompleteBox
* @extends {BaseComponent}
* @implements {OnInit}
* @implements {AfterViewInit}
*/
@Component({
selector: 'wm-auto-complete-box',
templateUrl: './auto-complete-box.component.html',
styleUrls: ['./auto-complete-box.component.scss'],
})
@ComponentId([AngularComponentId.autoCompleteBox])
export class AutoCompleteBoxComponent
extends BaseComponent
implements OnInit, AfterViewInit
{
/**
* Dropdown closed event.
*
* @type {EventEmitter}
* @memberof AutoCompleteBoxComponent
*/
@Output() dropDownClosed: EventEmitter<{
sender: AutoCompleteBoxModel;
e: any;
}> = new EventEmitter();
/**
* Current model
*
* @type {AutoCompleteBoxModel}
* @memberof AutoCompleteBoxComponent
*/
@Input()
model: AutoCompleteBoxModel;
/**
* Dropdown in the AutoCompleteBox component
*
* @type {IgxDropDownComponent}
* @memberof AutoCompleteBoxComponent
*/
@ViewChild('dynamicAutoComplete')
public dropdownAutoComplete: IgxDropDownComponent;
/**
* Input in the AutoCompleteBox component
*
* @type {IgxDropDownComponent}
* @memberof AutoCompleteBoxComponent
*/
@ViewChild('inputAutoComplete', { static: true })
public inputAutoComplete: ElementRef;
/**
* Template elements reference
*
* @type {QueryList<any>}
* @memberof AutoCompleteBoxComponent
*/
@ContentChildren('itemTemplate')
public itemsTemplate: QueryList<any>;
/**
* Item template to render when templates are added as children
*
* @memberof AutoCompleteBoxComponent
*/
@Input()
public templateItem = null;
/**
* Flag to know if the component is ready to render
*
* @type {boolean}
* @memberof AutoCompleteBoxComponent
*/
isInitialized = false;
/**
* ModelProxy is copy of model, used on the component initial building to prevent crashes with external bindings.
*
* @protected
* @type {AutoCompleteBoxModel}
* @memberof AutoCompleteBoxComponent
*/
protected modelProxy: AutoCompleteBoxModel =
ModelProxy.create<AutoCompleteBoxModel>();
/**
* Flag that controls when the user types in the autocompeltebox while the timer for MinimumPopulateDelay is running
*
* @memberof AutoCompleteBoxComponent
*/
private delayFlag = false;
/**
* Timer that manages MinimumPopulateDelay
*
* @memberof AutoCompleteBoxComponent
*/
private delayTimer = undefined;
/**
* Flag to handle changed by user action
*
* @type {boolean}
* @memberof AutoCompleteBoxComponent
*/
private dropDownChanged: boolean;
/**
* Creates an instance of AutoCompleteBoxComponent.
*
* @param {AutoCompleteBox} [injectedModel=null]
* @memberof AutoCompleteBoxComponent
*/
/* istanbul ignore next */
constructor(
@Optional() protected injectedModel: AutoCompleteBoxModel = null,
private cdRef: ChangeDetectorRef,
private injector: Injector
) {
super(cdRef, injector);
this.model = injectedModel;
}
/**
* Angular lifecycle
*
* @memberof AutoCompleteBoxComponent
*/
ngOnInit(): void {
this.model = this.model || this.injectedModel || new AutoCompleteBoxModel();
this.setupModel(this.model);
super.ngOnInit();
this.registerObservers(
this.dropDownClosed,
this.model,
this.model.DropDownClosed
);
}
/**
* Angular lifecycle.
*
* @memberof AutoCompleteBoxComponent
*/
ngAfterViewInit() {
super.ngAfterViewInit();
setTimeout(() => {
this.assignItemTemplate();
this.isInitialized = true;
this.detectChangesAction();
}, 0);
const dropdown = this.dropdownAutoComplete;
let timer = this.delayTimer;
let flag = this.delayFlag;
dropdown?.opening.subscribe((args) => {
if (
this.minimumPrefixLength < 0 ||
(this.valueSelected !== undefined &&
this.valueSelected.length < this.minimumPrefixLength)
) {
args.cancel = true;
} else {
if (timer !== undefined) {
clearTimeout(timer);
timer = undefined;
flag = false;
}
if (!flag) {
if (this.minimumPopulateDelay > 0) {
args.cancel = true;
flag = true;
timer = setTimeout(() => {
timer = undefined;
dropdown.open();
}, this.minimumPopulateDelay);
}
} else {
flag = false;
}
}
});
}
/**
* Event that occurs on a key up while the editor is in edit mode and the editor has focus
*
* @memberof AutoCompleteBoxComponent
*/
onInputKeyUpHandler(event: any): void {
if (event.keyCode === 38 || event.keyCode === 40) {
//ArrowUp (38) or ArrowDown (40)
this.selectedItem = this.dropdownAutoComplete.focusedItem.value;
} else {
if (this.isAlphabeticKey(event)) {
this.updateSelectionOnKey();
}
}
}
/**
* Process the selection when a new key has been typed in the input box.
* Processing the key includes narrowing the search, clearing the current selection and
* autoclosing the dropdown
*
* @private
* @memberof AutoCompleteBoxComponent
*/
private updateSelectionOnKey() {
if (this.valueSelected !== undefined) {
this.setSearchText(this.valueSelected);
if (this.selectedItem !== null) {
this.selectedItem = null;
}
if (
this.valueSelected.length < this.minimumPrefixLength &&
this.isDropDownOpen
) {
this.dropdownAutoComplete.close();
}
}
}
/**
* Indicathes wither the given key event corresponds to a alphabet key or not
*
* @private
* @param {*} event
* @return {*} true if the key is a valid alphabet key, false otherwise
* @memberof AutoCompleteBoxComponent
*/
private isAlphabeticKey(event: any) {
return event.keyCode !== 37 && event.keyCode !== 39 && event.keyCode !== 13;
}
/**
* Emitted when item selection is changing, before the selection completes
*
* @memberof AutoCompleteBoxComponent
*/
handleSelection(event: any) {
this.selectedItem = event.newSelection.value;
event.newSelection.value = this.model.getValueToDisplay(
event.newSelection.value
);
this.valueSelected = event.newSelection.value;
}
/**
* Emitted after the dropdown is opened
*
* @memberof AutoCompleteBoxComponent
*/
onDropDownOpenedHandler(): void {
this.dropDownChanged = true;
this.isDropDownOpen = true;
}
/**
* Emitted before the dropdown is closed
*
* @memberof AutoCompleteBoxComponent
*/
onDropDownClosedHandler(): void {
this.dropDownChanged = true;
this.isDropDownOpen = false;
this.model.DropDownClosed.fire([this.model, null]);
}
/**
* DropDownOpened
*
* @param {string} name
* @memberof AutoCompleteBoxComponent
*/
modelChangeHandler(name: string): void {
if (name === 'IsDropDownOpen' && this.dropdownAutoComplete) {
if (this.dropDownChanged) {
this.dropDownChanged = false;
} else {
if (this.model.IsDropDownOpen) {
this.dropdownAutoComplete.open();
} else {
this.dropdownAutoComplete.close();
}
}
}
super.modelChangeHandler(name);
}
/**
* Assign the item template
*
* @memberof AutoCompleteBoxComponent
*/
assignItemTemplate(): void {
if (this.itemsTemplate.toArray().length > 0) {
this.templateItem = this.itemsTemplate.toArray()[0];
}
}
/**
* Sets a value that indicates whether the drop-down portion of the control is open
*
* @type {boolean}
* @memberof AutoCompleteBoxComponent
*/
set isDropDownOpen(value: boolean) {
this.modelProxy.IsDropDownOpen = value;
}
/**
* Gets a value that indicates whether the drop-down portion of the control is open
*
* @type {boolean}
* @memberof AutoCompleteBoxComponent
*/
get isDropDownOpen(): boolean {
return this.model.IsDropDownOpen;
}
/**
* Sets the flag that indicates whether the match found during the filtering process will be displayed automatically in the text box.
*
* @type {boolean}
* @memberof AutoCompleteBoxComponent
*/
@Input()
set isTextCompletionEnabled(value: boolean) {
this.modelProxy.IsTextCompletionEnabled = value;
}
/**
* Gets the flag that indicates whether the match found during the filtering process will be displayed automatically in the text box.
*
* @type {boolean}
* @memberof AutoCompleteBoxComponent
*/
get isTextCompletionEnabled(): boolean {
return this.model.IsTextCompletionEnabled;
}
/**
* Sets the text that is used to filter items in the ItemsSource list.
*
* @type {string}
* @memberof AutoCompleteBoxComponent
*/
private setSearchText(value: string) {
this.modelProxy.SearchText = value;
}
/**
* Gets the text that is used to filter items in the ItemsSource list.
*
* @type {string}
* @memberof AutoCompleteBoxComponent
*/
get searchText(): string {
return this.model.SearchText;
}
/**
* Gets or sets the selected item in the drop-down.
*
* @type {}
* @memberof AutoCompleteBoxComponent
*/
@Input() set selectedItem(value: unknown | BindingInfo) {
/* istanbul ignore else */
if (
!this.checkAndRegisterCompatibilityBinding(
AutoCompleteBoxModel.SelectedItemProperty,
value
)
) {
this.modelProxy.SelectedItem = value;
if (this.modelProxy.Text !== value && value) {
this.modelProxy.Text = value.toString();
}
}
}
/**
* Return SelectedItem property
*
* @type {unknown}
* @memberof AutoCompleteBoxComponent
*/
get selectedItem(): unknown {
return this.model.SelectedItem;
}
/**
* Gets or sets a collection that is used to generate the items for the drop-down portion of the AutoCompleteBox control.
*
* @type {IList<unknown>}
* @memberof AutoCompleteBoxComponent
*/
@Input() set itemsSource(value: Iterable<unknown> | BindingInfo) {
/* istanbul ignore else */
if (
!this.checkAndRegisterCompatibilityBinding(
AutoCompleteBoxModel.ItemsSourceProperty,
value
)
) {
this.modelProxy.ItemsSource = value as Iterable<unknown>;
}
}
/**
* Return ItemsSource property
*
* @type {*}
* @memberof AutoCompleteBoxComponent
*/
get itemsSource(): Iterable<unknown> | BindingInfo {
return this.model.ItemsSource as Iterable<unknown>;
}
/**
* Return ItemsSource property
*
* @type {*}
* @memberof AutoCompleteBoxComponent
*/
get itemsToRender(): any[] {
return this.model.ItemsToRender as any[];
}
/**
* string used in the text property of the AutoCompleteBox
*
* @memberof AutoCompleteBoxComponent
*/
@Input() set text(value: string | BindingInfo) {
/* istanbul ignore else */
if (
!this.checkAndRegisterCompatibilityBinding(
AutoCompleteBoxModel.TextProperty,
value
)
) {
this.modelProxy.Text = value?.toString();
}
}
get text() {
return this.model.Text;
}
/**
* Gets the *Text* value property from the AutoCompleteBox.
*
* @type {string}
* @memberof AutoCompleteBoxComponent
*/
get valueSelected(): string {
return this.model.Text;
}
/**
* Sets the *Text* value of the AutoCompleteBox.
*
* @memberof AutoCompleteBoxComponent
*/
set valueSelected(value: string) {
this.model.Text = value;
}
/**
* Gets or sets the minimum number of characters required to be entered in the text input before the AutoCompleteBox displays possible matches.
*
* @type {number}
* @memberof AutoCompleteBoxComponent
*/
@Input()
set minimumPrefixLength(value: number) {
this.modelProxy.MinimumPrefixLength = value;
}
get minimumPrefixLength(): number {
return this.model.MinimumPrefixLength;
}
/**
* Gets or sets the minimum delay, in milliseconds, after text is typed in the text input before the AutoCompleteBox control populates the list of possible matches in the drop-down.
*
* @type {number}
* @memberof AutoCompleteBoxComponent
*/
@Input()
set minimumPopulateDelay(value: number) {
this.modelProxy.MinimumPopulateDelay = value;
}
get minimumPopulateDelay(): number {
return this.model.MinimumPopulateDelay;
}
/**
* Gets or sets how the text in the text input is used to filter items specified by the ItemsSource property for display in the drop-down.
*
* @type {string}
* @memberof AutoCompleteBoxComponent
*/
@Input()
set filterMode(value: string) {
if (AutoCompleteFilterMode[value] !== undefined) {
this.modelProxy.FilterMode = AutoCompleteFilterMode[value];
}
}
get filterMode(): string {
return AutoCompleteFilterMode[this.model.FilterMode];
}
/**
* Gets or sets a custom item filter function that will be called when filtering elements.
*
* @type {string}
* @memberof AutoCompleteBoxComponent
*/
@Input()
set itemFilter(value: (search: any, item: any) => boolean) {
this.modelProxy.ItemFilter = value;
if (value !== null) {
this.filterMode = 'Custom';
}
}
get itemFilter(): (search: any, item: any) => boolean {
return this.modelProxy.ItemFilter;
}
/**
* Gets or sets the Binding that is used to get the value for display in the text box portion of the AutoCompleteBox control, and to filter items for display in the drop-down.
*
* @type {string}
* @memberof AutoCompleteBoxComponent
*/
@Input()
set valueMember(value: string) {
/* istanbul ignore else */
if (
!this.checkAndRegisterCompatibilityBinding(
AutoCompleteBoxModel.ValueMemberProperty,
value
)
) {
this.modelProxy.ValueMember = value;
}
}
get valueMember(): string {
return this.model.ValueMember;
}
/**
* Gets or sets the Binding that is used to get the value for display in the text box portion of the AutoCompleteBox control, and to filter items for display in the drop-down.
*
* @type {Binding}
* @memberof AutoCompleteBoxComponent
*/
@Input()
set valueMemberBinding(value: Binding | BindingInfo) {
if (value instanceof Binding) {
this.modelProxy.ValueMemberBinding = value;
} else {
this.modelProxy.ValueMemberBinding = createBindingFromBindingInfo(
value,
this.model
);
}
}
get valueMemberBinding(): Binding | BindingInfo {
return this.model.ValueMemberBinding;
}
/**
* Sets the Binding that is used to get the value for display in the text box portion of the AutoCompleteBox control, and to filter items for display in the drop-down.
*
* @type {string}
* @memberof AutoCompleteBoxComponent
*/
@Input()
set valueMemberPath(value: string) {
this.modelProxy.ValueMemberPath = value;
}
/**
* Gets the Binding that is used to get the value for display in the text box portion of the AutoCompleteBox control, and to filter items for display in the drop-down.
*
* @type {string}
* @memberof AutoCompleteBoxComponent
*/
get valueMemberPath(): string {
return this.model.ValueMemberBinding?.Path.path;
}
/**
* Gets or sets the Template used to display each item in the drop-down portion of the control.
*
* @type {DataTemplate}
* @memberof AutoCompleteBoxComponent
*/
@Input() set itemTemplate(value: DataTemplate | BindingInfo) {
/* istanbul ignore else */
if (
!this.checkAndRegisterCompatibilityBinding(
AutoCompleteBoxModel.ItemTemplateProperty,
value
) &&
value instanceof DataTemplate
) {
this.modelProxy.ItemTemplate = value;
}
}
/**
* Return ItemsSource property
*
* @type {DataTemplate}
* @memberof AutoCompleteBoxComponent
*/
get itemTemplate(): DataTemplate | BindingInfo {
return this.model.ItemTemplate;
}
}
<!-- Render this div when AutoCompleteBox has a ControlTemplate -->
<div
*ngIf="model.templateModel"
[tabindex]="tabIndex"
class="default_div autoHeightWidth"
>
<wm-content-control [content]="model.templateModel">
<ng-content> </ng-content>
</wm-content-control>
</div>
<!-- Render this div when AutoCompleteBox does not have a ControlTemplate -->
<div *ngIf="!model.templateModel" class="default_div autoHeightWidth">
<input
#inputAutoComplete
type="text"
class="autocomplete_input default"
[attr.spellcheck]="spellCheck"
[tabindex]="tabIndex"
[disabled]="!isEnabled"
(keyup)="onInputKeyUpHandler($event)"
[igxAutocomplete]="dynamicAutoComplete"
[(ngModel)]="valueSelected"
/>
<igx-drop-down
#dynamicAutoComplete
(opened)="onDropDownOpenedHandler()"
(closed)="onDropDownClosedHandler()"
(selectionChanging)="handleSelection($event)"
>
<div class="drop-down___scroll-container">
<igx-drop-down-item
*ngFor="
let item of itemsToRender
| filter
: searchText
: filterMode
: valueMember
: valueMemberPath
: itemFilter;
trackBy: trackByFn
"
[value]="item"
>
<!-- This section represents the autocompletebox when it has no template children. Basic Scenario (valueMember handled in AutocompletePipeFilter)-->
<div
*ngIf="
isInitialized &&
!templateItem &&
!model?.ItemTemplate?.TemplateComponentConstructor
"
>
{{ item }}
</div>
<!-- This section represent the autocompletebox an itemTemplate for each item.-->
<div
*ngIf="
isInitialized &&
templateItem &&
!model?.ItemTemplate?.TemplateComponentConstructor
"
>
<ng-container
[ngTemplateOutlet]="templateItem"
[ngTemplateOutletContext]="{ context: item }"
>
</ng-container>
</div>
<!-- This section represent the autocompletebox when the items data comes through dataTemplate.-->
<div
*ngIf="
isInitialized &&
model &&
itemsSource &&
model?.ItemTemplate?.TemplateComponentConstructor
"
>
<ng-container
*ngComponentOutlet="
model.ItemTemplate.TemplateComponentConstructor;
injector: item | toInjector: model.ItemTemplate.declaringContext
"
>
</ng-container>
</div>
</igx-drop-down-item>
</div>
</igx-drop-down>
</div>
./auto-complete-box.component.scss
@import '../../scss/variables';
.default_div {
display: inline-block;
}
.default {
height: 100%;
width: 100%;
}
.drop-down___scroll-container {
max-height: 200px;
}
.autocomplete_input:focus {
outline: none !important;
border: 1.5px solid $default-control-active-color;
}