gridjs - gridjs - 如何在来自服务器的数据显示在表中后运行函数?
问题描述
这是我今天的代码:
new gridjs.Grid({
columns: [
{
name: 'Ticker',
formatter: (cell) => gridjs.html(`<a class="offcanvasStockInfo" data-stock="${cell}" data-bs-toggle="offcanvas" data-bs-target="#offcanvasStockInfo" aria-controls="offcanvasStockInfo">${cell}</a>`)
},
"Name",
"Date"
],
resizable: true,
//fixedHeader: true,
//height: '400px',
sort: false,
search: true,
server: {
url: '/ajax/ajax_earningsCalendar.php',
then: data => data.map(card => [card.stockTXT, card.nameTXT, card.nextEarningReport])
},
className: {
td: 'gridjs-td-class',
th: 'gridjs-th-class',
table: 'gridjs-table-class'
}
}).render(this);
setTimeout(function() {
ShowMoreInfoStockData();
},1000);
我希望这部分可以在没有超时的情况下运行:
setTimeout(function() {
ShowMoreInfoStockData();
},1000);
我试图在框架中搜索事件,但没有找到任何东西。
解决方案
推荐阅读
- python - 使用 matplotlib 绘制点
- java - Jira 插件开发依赖项
- swift - 这个 Swift 代码应该会产生内存泄漏,但它不会。有人能指出为什么吗?
- c++ - 在无限循环中使用`system()`的Windows线程在一小段时间后停止
- ios - 通过 Cocoapods 安装 FontAwesome
- apollo - 如何执行异步获取请求,然后重试上次失败的请求?
- python - Python将字符串写入纺织品中最多一行
- java - 错误:Java 链码正在进行中,并在 Fabric 1.1 中被禁用
- android - Room:使用 ID 检索用户信息
- css - DataTable中一个单元格的动态css - PrimeNG