List API overview
Methods
| Name | Description | 
|---|---|
| destructor() | removes a List instance and releases occupied resources | 
| editItem() | enables editing of an item | 
| getFocus() | returns the id of an item in focus | 
| getFocusItem() | returns the object of an item in focus | 
| paint() | repaints a list on a page | 
| resetFocus() | resets focus and moves the scroll to the beginning of the list | 
| setFocus() | sets focus to an item by its id and moves the scroll to it | 
important
- Use the methods of DataCollection to work with data.
- Apply the methods of Selection to manage the selection of List items.
Events
| Name | Description | 
|---|---|
| afterDrag | fires after dragging of an item is finished | 
| afterDrop | fires before the user has finished dragging of an item but after the mouse button is released | 
| afterEditEnd | fires after editing of an item is ended | 
| afterEditStart | fires after editing of an item has started | 
| beforeDrag | fires before dragging of an item has started | 
| beforeDrop | fires before the user has finished dragging of an item and released the mouse button | 
| beforeEditEnd | fires before editing of an item is ended | 
| beforeEditStart | fires before editing of an item has started | 
| cancelDrop | fires on moving a mouse pointer out of item's borders while dragging the item | 
| canDrop | fires when a dragged item is over a target item | 
| click | fires on clicking an item | 
| doubleClick | fires on double clicking an item | 
| dragIn | fires when an item is dragged to another potential target | 
| dragOut | fires when an item is dragged out of a potential target | 
| dragStart | fires when dragging of an item has started | 
| focusChange | fires on moving focus to a new item | 
| itemMouseOver | fires on moving the mouse pointer over an item | 
| itemRightClick | fires on right clicking an item | 
important
- Use the events of DataCollection to work with data of List.
- Apply the events of Selection to control the selection of List items.
Properties
| Name | Description | 
|---|---|
| css | Optional. Adds a CSS class(es) to the component | 
| data | Optional. Specifies an array of data objects to set into the list | 
| dragCopy | Optional. Defines that an item is copied to a target during drag-n-drop | 
| dragMode | Optional. Enables drag-n-drop in List | 
| editable | Optional. Enables editing in List | 
| eventHandlers | Optional. Adds event handlers to HTML elements of a custom template of List items | 
| height | Optional. Sets the height of List | 
| htmlEnable | Optional. Enables/disables rendering of HTML content (inner HTML) in List options | 
| itemHeight | Optional. Sets the height of an item | 
| keyNavigation | Optional. Enables/disables navigation in List by arrow keys | 
| multiselection | Optional. Enables selection of multiple List items, sets the mode of multiselection | 
| selection | Optional. Enables selection of List items | 
| template | Optional. Specifies a template for List items | 
| virtual | Optional. Enables dynamic rendering of List items |