Skip to main content

BootstrapMenu Class

Declaration

class BootstrapMenu extends Control

Remarks

IMPORTANT

Bootstrap Controls for ASP.NET Core are in maintenance mode. We don’t add new controls or develop new functionality for this product line. Our recommendation is to use the ASP.NET Core Controls suite.

Methods

getItem(index) Method

Declaration

getItem(
    index: number
): BootstrapMenuItem | null

Parameters

Name Type
index number

Returns

Type
BootstrapMenuItem
null

getItemByName(name) Method

Declaration

getItemByName(
    name: string
): BootstrapMenuItem | null

Parameters

Name Type
name string

Returns

Type
BootstrapMenuItem
null

getItemCount Method

Declaration

getItemCount(): number

Returns

Type
number

getOrientation Method

Declaration

getOrientation(): string

Returns

Type
string

getRootItem Method

Declaration

getRootItem(): BootstrapMenuItem | null

Returns

Type
BootstrapMenuItem
null

getSelectedItem Method

Declaration

getSelectedItem(): BootstrapMenuItem | null

Returns

Type
BootstrapMenuItem
null

off<K> Method

Declaration

off<K extends keyof BootstrapMenuEventMap>(
    eventName?: K,
    callback?: (this: BootstrapMenu,
    args?: BootstrapMenuEventMap[K]) => void
): this

Parameters

Name Type
eventName K
callback (this: BootstrapMenu, args?: BootstrapMenuEventMap[K]) => void

Type Parameters

Name Type
K keyof

Returns

Type
this

on<K>(eventName, callback) Method

Declaration

on<K extends keyof BootstrapMenuEventMap>(
    eventName: K,
    callback: (this: BootstrapMenu,
    args?: BootstrapMenuEventMap[K]) => void
): this

Parameters

Name Type
eventName K
callback (this: BootstrapMenu, args?: BootstrapMenuEventMap[K]) => void

Type Parameters

Name Type
K keyof

Returns

Type
this

once<K>(eventName, callback) Method

Declaration

once<K extends keyof BootstrapMenuEventMap>(
    eventName: K,
    callback: (this: BootstrapMenu,
    args?: BootstrapMenuEventMap[K]) => void
): this

Parameters

Name Type
eventName K
callback (this: BootstrapMenu, args?: BootstrapMenuEventMap[K]) => void

Type Parameters

Name Type
K keyof

Returns

Type
this

setOrientation(orientation) Method

Declaration

setOrientation(
    orientation: string
): void

Parameters

Name Type
orientation string

setSelectedItem(item) Method

Declaration

setSelectedItem(
    item: BootstrapMenuItem
): void

Parameters

Name Type
item BootstrapMenuItem