← Form Builder and Drag Drop API

Directive · v2.7.0

NgbDndItemDirective

NgbDndItemDirective directive exported by the ngbootstrap package API.

Import

import { NgbDndItemDirective } from '@angular-bootstrap/ngbootstrap';

Selector:[ngbDndItem]

Declaration

class NgbDndItemDirective<T = unknown>

Inputs

ngbDndItem

required: the value carried by this row/panel

item: T

dndGroup

optional: constrain cross-list drops

dndGroup?: string

dndIndex

index inside its parent list (bind to the rendered row index)

dndIndex?: number

dndSourceList

Explicit source list for recursive templates where DI can be ambiguous.

dndSourceList?: T[]

dndDisabled

dndDisabled: boolean

Default:false

dndRole

dndRole: string

Default:'listitem'

Outputs

dndDragStart

dndDragStart: EventEmitter<T>

dndDragEnd

dndDragEnd: EventEmitter<void>

Properties

draggable

get draggable(): boolean

hostClass

hostClass: boolean

Default:true

dragging

dragging: boolean

Default:false

ariaGrabbed

get ariaGrabbed(): "true" | "false"

role

get role(): string set role(value: string)

tabIndex

tabIndex: number

Default:0

Methods

onDragStart

onDragStart(ev: DragEvent): void

onDragEnd

onDragEnd(): void

onKeydown

onKeydown(ev: KeyboardEvent): void
Source: src/drag-drop/src/directive/dnd-item.directive.ts in the installed @angular-bootstrap/ngbootstrap package. Angular compiler metadata and private members are omitted.

This project is not affiliated with ng-bootstrap or ngx-bootstrap. Those projects focus mainly on Bootstrap components for Angular. ngbootstrap focuses on Angular UI for data-heavy apps, especially Data Grid, Angular-native Form Builder, drag and drop workflows, documentation examples, and performance-focused Angular patterns.