Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resetting table does not reset ColReorder #89

Open
Rello opened this issue Apr 9, 2024 · 2 comments
Open

Resetting table does not reset ColReorder #89

Rello opened this issue Apr 9, 2024 · 2 comments

Comments

@Rello
Copy link

Rello commented Apr 9, 2024

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

@Rello
Copy link
Author

Rello commented Apr 9, 2024

I want to add some additional finding for documentation purposes.

I use the parameter scrollX: true.
if this is removed, the tables is generated correctly with colReorder: true

but why does it work with a completely clean table, but not with a redrawn, once it was colReordered before?

@AllanJard
Copy link
Contributor

Could you create a test case demonstrating the issue please? I've just tried to do so here: https://live.datatables.net/hudumofu/1/edit but it appears to work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants