Class: DropdownMenu

DropdownMenu

handsontable-pro/src/plugins/dropdownMenu/dropdownMenu.js, line 37

Members

staticDropdownMenu.DEFAULT_ITEMS

Default menu items order when dropdownMenu is enabled by setting the config item to true.

commandExecutorCommandExecutor

Instance of CommandExecutor.

eventManagerEventManager

Instance of EventManager.

itemsFactoryItemsFactory

Instance of ItemsFactory.

Instance of Menu.

Methods

handsontable-pro/src/plugins/dropdownMenu/dropdownMenu.js, line 201

close()

Close menu.

handsontable-pro/src/plugins/dropdownMenu/dropdownMenu.js, line 352

destroy()

Destroy instance.

handsontable-pro/src/plugins/dropdownMenu/dropdownMenu.js, line 157

disablePlugin()

Disable the plugin for this Handsontable instance.

handsontable-pro/src/plugins/dropdownMenu/dropdownMenu.js, line 101

enablePlugin()

Enable the plugin for this Handsontable instance.

handsontable-pro/src/plugins/dropdownMenu/dropdownMenu.js, line 234

executeCommand(commandName, params)

Execute context menu command.

You can execute all predefined commands:

  • 'row_above' - Insert row above
  • 'row_below' - Insert row below
  • 'col_left' - Insert column left
  • 'col_right' - Insert column right
  • 'clear_column' - Clear selected column
  • 'remove_row' - Remove row
  • 'remove_col' - Remove column
  • 'undo' - Undo last action
  • 'redo' - Redo last action
  • 'make_read_only' - Make cell read only
  • 'alignment:left' - Alignment to the left
  • 'alignment:top' - Alignment to the top
  • 'alignment:right' - Alignment to the right
  • 'alignment:bottom' - Alignment to the bottom
  • 'alignment:middle' - Alignment to the middle
  • 'alignment:center' - Alignment to the center (justify)

Or you can execute command registered in settings where key is your command name.

Parameters:
Name Type Description
commandName String
params *
handsontable-pro/src/plugins/dropdownMenu/dropdownMenu.js, line 94

isEnabled(){Boolean}

Check if the plugin is enabled in the Handsontable settings.

Returns: {Boolean}
handsontable-pro/src/plugins/dropdownMenu/dropdownMenu.js, line 182

open(event)

Open menu and re-position it based on the DOM event object.

Parameters:
Name Type Description
event Event | Object

Event object.

Fires:
handsontable-pro/src/plugins/dropdownMenu/dropdownMenu.js, line 243

setListening(listen)

Turn on / turn off listening on dropdown menu

Parameters:
Name Type Description
listen Boolean

Turn on listening when value is set to true, otherwise turn it off.

handsontable-pro/src/plugins/dropdownMenu/dropdownMenu.js, line 148

updatePlugin()

Updates the plugin to use the latest options you have specified.