首页 > 解决方案 > Tabulator 触发多个 cellClick 事件

问题描述

当我尝试在 Tabulator 中动态重新加载数据时。例如,我将值从 true 设置为 false 并尝试重新加载数据。每次重新加载数据时,我都会得到一个新的单击事件处理程序。

我已经和所有孩子一起尝试过 jquery.off() 等,但到目前为止还没有运气。有人遇到过这个问题并解决了吗?

// Reload the data
var table = Tabulator.prototype.findTable("#mytable")[0];
table.setData(tabledata)

在我的专栏中,我处理单元格点击和右键上下文菜单。

columns: [
{
   title: "MyCell", cellClick: function (e, cell) { alert("this gets called many times")

谢谢

史蒂夫

标签: javascripttabulator

解决方案


推荐阅读