Interest in ColReorderWithResize.js
Interest in ColReorderWithResize.js
jeffreydwalter
Posts: 10Questions: 0Answers: 0
Hello,
I spent a couple of days and updated the ColReorderWithResize.js plugin to incorporate the latest code from the ColReorder.js plugin, so it now works with the latest version of dataTables. I also fixed various bugs that plagued the old ColReorderWithResize.js plugin.
I would like to contribute this updated version of the plugin to the official dataTables github.
Is there any interest in this? If yes, what's the proper way to contribute?
Thanks,
Jeff W.
This discussion has been closed.
Replies
Just curious, is there a demo page to see it in action?
Also there is already ColReorder extension even though it doesn't support resizing yet.
Maybe it would make sense to have a separate ColResize extension, like this one.
See more articles about jQuery DataTables on gyrocode.com.
I don't have a demo page for you. There was an (un)official thrid-party plugin called ColReorderWithResize.js which was abandoned years ago, presumably because it had issues. Consequently, it doesn't work with dataTables 1.10.x+.
The ColReorderWithResize plugin was originally based on the ColReorder plugin.
What I did was update ColReorderWithResize.js with the latest code from ColReorder.js and then refactored the additional code that makes resizing work to fix long-standing bugs in said plugin.
I hadn't seen the ColResize extension. I just tried it out, and it seems like it has some of the same issues that the original ColReorderWithResize extension had, one of which is that you can drag a column header to the left and that it will allow that header to expand past what the body column can do because of fixed width data in the neighbor td.
Can you please share a link to the repository with updated ColReorderWithResize.js extension? I would be curious to test it.
See more articles about jQuery DataTables on gyrocode.com.
@jeffreydwalter
I have been trying to fix the ColReorderWithResize.js from last 2 days.
It is not working with fixed columns.
Would you please share a link to updated ColReorderWithResize.js ?
I will share the library soon. I wrote the code to fix it as part of a commercial product, and it is going through legal so I can contribute it back.
@jeffreydwalter Thank you
@Iamcoding I FINALLY got permission to open-source my changes. Here's my github repo.
The plugin is not perfect, but hopefully it'll be good enough to maintain and build on.
@Iamcoding I renamed the repo, so use this link. (Edit: Just checked the original link, and it actually still works.)
@gyrocode ^^
@jeffreydwalter Thanks for sharing the code, very much appreciated. Posted a review for my readers, please see jQuery DataTables: Column reordering and resizing.
See more articles about jQuery DataTables on gyrocode.com.
@gyrocode awesome write-up! Thanks for the mention.
@jeffreydwalter I may be updating the article with more details, however I could not make your plug-in work together with FixedColumn plug-in. Did you use your plug-in with FixedColumn?
@gyrocode I did not. File a bug at the github and I'll take a look. Did the old plugin work with FixedColumn?
I just signed to say "thanks" for this plugin!
I'd spent an hour or so searching around before coming across the original , and was balking at the prospect of having to undertake a port, when I happened up @jeffreydwalter's efforts here. I'm very happy to have found this!
I wonder if this will eventually be "officially" merged into an enhanced ColReorder?
@jeffreydwalter the column reorder not working, the colReorder position not changed in stateSaveCallback function params of data
ColReorder: [0, 1, 2, 3, 4, 5] positon not changed, when drag the columns in jquery datatable
@dinesh_raja If you want support from the developer of the ColReorderWithResize plugin you should use his github repo to post a new issue. We can take a look to make sure the issue isn't something else if you want to provide a test case replicating the issue.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
@kthorngren I created a issue in github and I added the code in JsFiddle.
https://jsfiddle.net/dinesh_raja/jtrnudqf/8/
@dinesh_raja Looks like this is an old issue. Here is a 2013 thread and there is another github issue posted. It seems the developer is not interested in a fix for this. A very old version of colReorder is being used and may not work correctly with newer versions of Datatables.
I would take a look at using the
column-reorder
event and storing the updated order in a global variable. Then usestateSaveParams
to update thecolReorder
property with the global variable.Kevin