Directive · v2.7.0
NgbDndListDirective
NgbDndListDirective directive exported by the ngbootstrap package API.
Import
import { NgbDndListDirective } from '@angular-bootstrap/ngbootstrap';Selector:[ngbDndList]
Declaration
class NgbDndListDirective<T = unknown>Inputs
dndChildrenKey
dndChildrenKey: string | nullDefault:'children'
ngbDndList
Bind your array here: <div [ngbDndList]="items">
list: T[]dndGroup
Optional: group barrier across lists
dndGroup?: stringdndDisabled
Disable this list
dndDisabled: booleanDefault:false
dndCloneOnDrop
NEW: clone if source wasn't a list (e.g. palette)
dndCloneOnDrop: booleanDefault:false
dndCloneFn
NEW: custom clone function
dndCloneFn?: (item: T) => TdndIsPalette
dndIsPalette: booleanDefault:false
dndCanDrop
dndCanDrop: boolean | DndCanDropFn<T>Default:true
dndAriaLabel
dndAriaLabel?: stringdndRole
dndRole: stringDefault:'list'
Outputs
dndDropped
Fires after item is inserted
dndDropped: EventEmitter<NgbDndDropEvent<T>>Properties
denied
get denied(): booleanariaLabel
get ariaLabel(): string | nullrole
get role(): string
set role(value: string)hostClass
hostClass: booleanDefault:true
isOver
get isOver(): booleandataDropValid
get dataDropValid(): "true" | "false" | nullMethods
onDragEnter
onDragEnter(ev: DragEvent): voidonDragOver
onDragOver(ev: DragEvent): voidonDragLeave
onDragLeave(ev: DragEvent): voidonDocumentDrop
onDocumentDrop(ev: DragEvent): voidonDrop
onDrop(ev: DragEvent): voidonDocumentDragFinished
onDocumentDragFinished(): voidemitDropEvent
emitDropEvent(event: NgbDndDropEvent<T>): void