javascript - 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")
谢谢
史蒂夫
解决方案
推荐阅读
- windows - FFMPEG管道从Windows上的命令行输入文件名
- java - 无法从 Runnable 更新图像 - Android
- swiftui - SwiftUI 中的列表视图抖动
- vue.js - 如何在 vuejs 中更新动态路由器链接的组件属性
- c - GDB:对于不同硬件平台上的每个程序,函数地址是固定的还是动态的?
- ios - 创建 GIDGoogleUser 的模拟实例
- excel - How to count differences between Cells
- swift - 无法使用 RealityKit 场景预览 SwiftUI Canvas
- splunk - 如何将来自不同搜索的计数累积到一个(饼图)图表中?
- html - 为网页提供独立的可滚动目录窗格