DataTables / DataTables/ColReorder

Resetting table does not reset ColReorder

Open
#89 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
57
Forks
70
Avg merge
9h 24m
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using the shown DataTable initialization and destroy sequence, then inspect the ColReorder lifecycle around destroy and reinitialization. The issue is done when a second table initialized without an explicit order displays correctly without requiring draw() or a full refresh.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.