!!!###!!!title=event list——VisActor/VTable tutorial documents!!!###!!!

Event event

introduce

Table event list, you can listen to the required events according to actual needs, and realize custom business.

The specific return data of the event can be actually tested to observe whether it meets the business needs, or communicate with us.

For a more comprehensive list of events, please refer to: https://visactor.io/vtable/api/events

NameEvent NameDescription
Life cycle event: initialization completedINITIALIZEDLife cycle event: triggered after successful initialization is completed
Rendering CompleteAFTER_RENDERTriggered every time rendering is completed
Listen to chart eventsSame as the events specified in the vchart tutorialEmbed the chart in the table and use it when you need to listen to chart events. Using method onVChartEvent not on
ClickCLICK_CELLCell Click Event
Double ClickDBLCLICK_CELLCell Double Click Event
Right ClickCONTEXTMENU_CELLCell Right Click Event
Right Click on the canvasCONTEXTMENU_CANVASCanvas Right Click Event
Keyboard PressCLICK_CELLKeyboard Press Events
mouse downMOUSEDOWN_CELLcell mouse down event
mouse releaseMOUSEUP_CELLcell mouse release event
Select state changeSELECTED_CELLCell select state change event
Select state be clearedSELECTED_CLEARCell select state all be cleared event
mouse entryMOUSEENTER_CELLmouse entry cell event
mouse movementMOUSEMOVE_CELLmouse movement event on a cell
mouse leaveMOUSELEAVE_CELLmouse leave cell event
Drag Column WidthRESIZE_COLUMNColumn Width Adjustment Event
Drag and drop column width endRESIZE_COLUMN_ENDcolumn width adjustment end event
Drag Row HeightRESIZE_ROWRow Height Adjustment Event
Drag and drop row height endRESIZE_ROW_ENDrow height adjustment end event
Merge cellsMERGE_CELLSTriggered after mergeCells succeeds
Unmerge cellsUNMERGE_CELLSTriggered after unmergeCells is called
Drag headerCHANGE_HEADER_POSITIONDrag header to move position event
Click to sortSORT_CLICKClick to sort icon event
After sortAFTER_SORTExecute after sorting event
Click Fixed ColumnFREEZE_CLICKClick Fixed Column Icon Event
ScrollSCROLLScroll Table Events
Click the drop-down iconDROPDOWN_MENU_CLICKClick the drop-down menu icon event
Click on the drop-down menuMENU_CLICKClick on the drop-down menu Events
Mouse over miniatureMOUSEOVER_CHART_SYMBOLMouse over miniature mark events
Drag and drop box to select mouse releaseDRAG_SELECT_ENDDrag and drop box to select cell mouse release event
drill button clickDRILLMENU_CLICKdrill button click event
Pivot Table Tree Show CollapseTREE_HIERARCHY_STATE_CHANGEPivot Table Tree Show Collapse State Change Events
KeysKEYDOWNKeyboard Press Events
Legend item click eventLEGEND_ITEM_CLICKMouse clicks on an item in the legend
Legend item hoverLEGEND_ITEM_HOVERMouse hover an item in the legend
Legend item unhoverLEGEND_ITEM_UNHOVERLegend item when mouse leaves hover
The mouse enters the coordinate axisMOUSEENTER_AXISThe mouse enters the coordinate axis component
mouse leaves the axisMOUSELEAVE_AXISmouse leaves the axis component
Listen to copyCOPY_DATAThis event is triggered when a cell is copied using the shortcut key
The mouse enters the table areaMOUSEENTER_TABLEThis event is triggered when the mouse enters the table area
The mouse leaves the table areaMOUSELEAVE_TABLEThis event is triggered when the mouse leaves the table area
Mouse downMOUSEDOWN_TABLEThis event is triggered when the mouse is pressed in the table area
Paste dataPASTED_DATAPaste data event
Plugin eventPLUGIN_EVENTPlugin want fire event to table, other plugins can listen this type event

Event monitoring method

const {
    CLICK_CELL,
    DBLCLICK_CELL,
    DBLTAP_CELL,
    MOUSEDOWN_CELL,
    MOUSEUP_CELL,
    SELECTED_CELL,
    KEYDOWN,
    MOUSEMOVE_CELL,
    MOUSEENTER_CELL,
    MOUSELEAVE_CELL,
    MOUSEOUT_CELL,
    INPUT_CELL,
    PASTE_CELL,
    RESIZE_COLUMN,
    RESIZE_ROW,
    SCROLL,
    SCROLL_VERTICAL_END,
    SCROLL_HORIZONTAL_END,
    CHANGED_VALUE,
    FREEZE_CLICK,
    SORT_CLICK,
    AFTER_SORT,
    DROPDOWN_MENU_CLICK,
    CONTEXTMENU_CELL,
    CONTEXTMENU_CANVAS,
  } = VTable.ListTable.EVENT_TYPE;
  const tableInstance =new ListTable(options);
  tableInstance.on(CLICK_CELL, (...args) => console.log(CLICK_CELL, args));