Interest in ColReorderWithResize.js

Interest in ColReorderWithResize.js

jeffreydwalterjeffreydwalter 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.

Replies

  • gyrocodegyrocode Posts: 126Questions: 6Answers: 30

    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.

  • jeffreydwalterjeffreydwalter Posts: 10Questions: 0Answers: 0
    edited June 2017

    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.

  • jeffreydwalterjeffreydwalter Posts: 10Questions: 0Answers: 0

    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.

  • gyrocodegyrocode Posts: 126Questions: 6Answers: 30

    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.

  • IamcodingIamcoding Posts: 2Questions: 0Answers: 0

    @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 ?

  • jeffreydwalterjeffreydwalter Posts: 10Questions: 0Answers: 0

    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.

  • IamcodingIamcoding Posts: 2Questions: 0Answers: 0

    @jeffreydwalter Thank you

  • jeffreydwalterjeffreydwalter Posts: 10Questions: 0Answers: 0

    @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.

  • jeffreydwalterjeffreydwalter Posts: 10Questions: 0Answers: 0
    edited October 2017

    @Iamcoding I renamed the repo, so use this link. (Edit: Just checked the original link, and it actually still works.)

  • jeffreydwalterjeffreydwalter Posts: 10Questions: 0Answers: 0
  • gyrocodegyrocode Posts: 126Questions: 6Answers: 30

    @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.

  • jeffreydwalterjeffreydwalter Posts: 10Questions: 0Answers: 0

    @gyrocode awesome write-up! Thanks for the mention.

  • gyrocodegyrocode Posts: 126Questions: 6Answers: 30

    @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?

  • jeffreydwalterjeffreydwalter Posts: 10Questions: 0Answers: 0

    @gyrocode I did not. File a bug at the github and I'll take a look. Did the old plugin work with FixedColumn?

  • ShaheedShaheed Posts: 2Questions: 0Answers: 0
    edited June 2019

    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?

  • dinesh_rajadinesh_raja Posts: 2Questions: 0Answers: 0

    @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

  • kthorngrenkthorngren Posts: 20,269Questions: 26Answers: 4,765
    edited July 2021

    @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

  • dinesh_rajadinesh_raja Posts: 2Questions: 0Answers: 0

    @kthorngren I created a issue in github and I added the code in JsFiddle.
    https://jsfiddle.net/dinesh_raja/jtrnudqf/8/

  • kthorngrenkthorngren Posts: 20,269Questions: 26Answers: 4,765

    @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 use stateSaveParams to update the colReorder property with the global variable.

    Kevin

Sign In or Register to comment.