Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Resetting table does not reset ColReorder

未关闭
#89 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
typescript
领域
frontend

调研方向

使用所示的 DataTable 初始化和销毁序列重现该问题,然后检查销毁和重新初始化过程中的 ColReorder 生命周期。当第二个未显式指定顺序初始化的表格能够正确显示,且不需要 draw() 或完整刷新时,问题即完成。

由索引模型根据 Issue 内容生成。

描述

Hello,

thank you for providing ColReorder!

  1. I initialize a table with a reorder
    OCA.Analytics.tableObject = new DataTable(domTarget, { colReorder: { order: [0, 2, 1, 5, 6, 4, 3]} })
  2. I destroy the table
    OCA.Analytics.tableObject.destroy();
  3. I initialize a table without a given order
    OCA.Analytics.tableObject = new DataTable(domTarget, { colReorder: true })
  4. The table columns are off
  • Adding a OCA.Analytics.tableObject.colReorder.reset() before the destroy does not make a difference. something seems to be kept in memory somewhere?
  • doing a draw() after the table is displayed will correct the display, but this is not intended
  • doing a full refresh into the second table, it is shown correctly

reordered table:
Bildschirmfoto 2024-04-09 um 10 47 52

normal table after coming from the reordered one:
Bildschirmfoto 2024-04-09 um 10 49 31

主要语言
TypeScript
星标
57
派生
70
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DataTables/ColReorder 的其他 Issue

查看 DataTables/ColReorder 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。