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

Reorder column with cookies enabled does not restore the table correctly after refresh #6728

Open
mtaylor091 opened this issue Apr 4, 2023 · 5 comments
Assignees
Labels
cookie Issues for the cookie extension. feature Issues asking for a new feature to be added, or an existing one to be extended or modified. reorder-columns Issues for the reorder-columns extension.

Comments

@mtaylor091
Copy link

Bootstraptable version(s) affected

1.21.3

Description

When using both the cookie and reorder column plugins, after you reorder a column and refresh the page the header and columns do not match up. The header of the column you dragged will be in the correct place but the row columns will be where they were originally provided.

Steps to reproduce:

  1. Make a table using the cookie and reorder column plugins
  2. Drag a column to a new position
  3. Refresh the page
  4. The header is in the new position but the row contents are in their old positions

Example(s)

https://live.bootstrap-table.com/code/mtaylor091/14910

Possible Solutions

No response

Additional Context

No response

@mtaylor091 mtaylor091 added the Bug Issues which are marked as Bug label Apr 4, 2023
@wenzhixin wenzhixin added cookie Issues for the cookie extension. reorder-columns Issues for the reorder-columns extension. labels Apr 5, 2023
@wenzhixin wenzhixin assigned djhvscf and UtechtDustin and unassigned djhvscf Apr 5, 2023
@wenzhixin
Copy link
Owner

Remove the code (data-dragaccept="allowReorder") in your case, and it works well: https://live.bootstrap-table.com/code/wenzhixin/15806.

@wenzhixin wenzhixin added help-wanted Issues we need or would love help from the community to resolve. and removed Bug Issues which are marked as Bug labels Jul 9, 2023
@mtaylor091
Copy link
Author

mtaylor091 commented Jul 10, 2023

Thanks for the reply @wenzhixin!

I have looked at your live example and it is still happening. I have attached a gif showing the issue on your live example:

  1. Drag the Item Price column so it is the 2nd column
  2. Then click run
  3. After reload the Item Price header column is the 2nd column but the data is shown in the 1st column

bs-table-reorder-github

@wenzhixin wenzhixin reopened this Jul 11, 2023
@robertkrzuk
Copy link

robertkrzuk commented Aug 24, 2023

Have got the same issue. Any workaround?
@wenzhixin this should labeled as BUG

@mohsin5432
Copy link

facing same issue, any luck ?

@wenzhixin wenzhixin added Bug Issues which are marked as Bug and removed help-wanted Issues we need or would love help from the community to resolve. labels Dec 22, 2023
@wenzhixin wenzhixin added feature Issues asking for a new feature to be added, or an existing one to be extended or modified. and removed Bug Issues which are marked as Bug labels Jan 14, 2024
@nighttiger1990
Copy link

nighttiger1990 commented Oct 4, 2024

@wenzhixin, can you review this? @Vinidamiaop is working for resolving this at #7468

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cookie Issues for the cookie extension. feature Issues asking for a new feature to be added, or an existing one to be extended or modified. reorder-columns Issues for the reorder-columns extension.
Projects
None yet
Development

No branches or pull requests

7 participants