UNPKG

@visactor/vtable

Version:

canvas table width high performance

22 lines (17 loc) 743 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: !0 }), exports.bindButtonClickEvent = void 0; const TABLE_EVENT_TYPE_1 = require("../../core/TABLE_EVENT_TYPE"); function bindButtonClickEvent(table) { table.on(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.CLICK_CELL, (e => { const {col: col, row: row, target: target} = e; "button" !== target.name || target.attribute.disable || table.hasListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.BUTTON_CLICK) && table.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.BUTTON_CLICK, { col: col, row: row, event: e.event }); })); } exports.bindButtonClickEvent = bindButtonClickEvent; //# sourceMappingURL=button.js.map