Ngx datatable draggable rows

By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. The dark mode beta is finally here. Change your preferences any time. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. However, all the plunkers provided show multiple issues in the console when I tried to open them.

If you play around, you can see the rows are dropped without order. It will be great if someone can point me in the right direction to fix the problem. Learn more. Ngx-datatable draggable row Ask Question. Asked 1 year, 6 months ago.

Some menu here

Active 11 months ago. Viewed 1k times. Ardenne Ardenne 1 1 gold badge 4 4 silver badges 16 16 bronze badges. Hey Ardenne, Have you found a solution. Please let me in if you have. Thanks in advance. Hi TorabShaikh.

Drag/drop in Angular 5+ - part 5 of 6 - sortable list

Unfortunately, I stopped working on this issue a couple of months ago. I think someone else is working on it on the GitHub page. You should try there.

Active Oldest Votes. Just remove the slice call in onDrop in your AppComponent. Thank you for your help, I have updated my repo. Unfortunately, the answer came a little late for my task, but I will keep the sample available for others. Ardenne The sample seems to be offline - could you make it available again please? I am trying to use this. But when building the app, getting these errors.

What could be the issue? Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.

Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Cryptocurrency-Based Life Forms. Q2 Community Roadmap. Featured on Meta.GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. Expected behavior It would be great to have the option to create draggable rows.

If you implement a file listing using ngx-datatable, a drag option would allow to simplify the move operation a lot. This one is gonna be tough, I don't have a direct need for it, if you wanna take it on I'm happy to point you in the right direction though. Actually a plus 1 for this. The virtual scrolling scenario makes it near impossible, if you aren't doing that it should be easy though.

But I cant with actual declaration of template to atach these event directly I only can do on a cell I tried following the below two approaches I forked the library and dispatched the dragstart event from the row to the datatable component and handled it on the component to check if this event can be listened.

The approach 2 works well, but I wanted to know if this is the right way we are heading? Also please provide your feedback for approach 1if any. Is that something we can live with and improve it with some modifications for it to work?

Please suggest. Can you send a pull request to amcdnl soon? This looks to be a tricky feature to implement. I might be able to work out something in my fork, but it's unstable when you start thinking in terms of sorting and keeping the sort after collection updates, a concept that is present in rows but not columns.

Thanks very much for sharing. Thanks is advance!

ngx datatable draggable rows

VaniKiran Hi, I will be happy to take a look, and will provide a plunker for the fix. VaniKiran Hi, so I did some digging and found that dragging works but not visually. The model in dragula and the model in the component are updating correctly. I will play with it and try out writing a function that takes in the current "el" to mirror the container, and loop through on every drag to update the current "el" children's transform and backface-visibility styles generated by ngx-datatable, to bring back the "dragging" look and feel.

And will try passing in a new 'datatable-scroller' parent node on dropModel.

ngx datatable draggable rows

There was a problem xtgrant example. For anybody who is interested in a native implementation without any other dependencies. I made a custom implementation which can be found here :. This should work with single and multi selection.GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account. I got the same error.

ngx datatable draggable rows

With 1. Hi, Does any one know how to call the sort Manually? ViewChild datatable doesn't have any sort methods to call. Please help if there is a workaround to call sort manually. The sorting stops working with the custom template and there is no way to call the onSort function. I believe the problem lies at header-cell. I was talking about being able to click on the column header and change the sort direction.

This function does not work if I use a custom template for the column header. Is there a possibility to be able to change column sorting when using a custom template? The above works for let-value, but for let-column It doesn't. Even with prop and name. This resolved it though. Skip to content. Dismiss Join GitHub today GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Sign up. New issue. Jump to bottom. Copy link Quote reply. I'm submitting a Expected behavior Sorting should work. Sort by column with a customized title Please tell us about your environment: Window 10 Table version: 0.

This comment has been minimized. Sign in to view. Can you retry on 1. I moved to 1. Got the same issue in 1.DataTables designed and created by SpryMedia Ltd. Privacy policy.

SpryMedia Ltd is registered in Scotland, company no. January edited January in General. Was wondering if there was anything out there for doing the same things but with Rows? If not, is there an easy way to do this? January Got it : Basically in my table I have a column that is ordered and this always stays the same no matter the drag and drop.

So when, for example, row 6 was dragged to row 1 I needed to update this column to reflect it's new order. This wasn't hard. But when that column was sorted it didn't take into account the new order.

Hi jamiller, Very nice - good to hear you got it "sorted" Out of interest, do you have an example that you would be willing to share, or even just the initialisation code? This would be quite a nice demo for DataTables Regards, Allan. Hey Allan, Absolutely. I am in the process of building an example of this. Will notify you when it's complete. Thanks, Jeff. April Any more info on this or a nudge in the right direction?

Selicor Posts: 11 Questions: 0 Answers: 0. July Would be very, very interested as well as I am currently looking at all jquery options for drag and drop!

Swan Posts: 17 Questions: 0 Answers: 0.By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. However, all the plunkers provided show multiple issues in the console when I tried to open them. If you play around, you can see the rows are dropped without order.

It will be great if someone can point me in the right direction to fix the problem. How are we doing? Please help us improve Stack Overflow. Take our short survey. Learn more. Ngx-datatable draggable row Ask Question. Asked 1 year, 6 months ago. Active 11 months ago. Viewed 1k times. Ardenne Ardenne 1 1 gold badge 4 4 silver badges 16 16 bronze badges. Hey Ardenne, Have you found a solution. Please let me in if you have. Thanks in advance. Hi TorabShaikh.

Unfortunately, I stopped working on this issue a couple of months ago. I think someone else is working on it on the GitHub page. You should try there. Active Oldest Votes. Just remove the slice call in onDrop in your AppComponent. Thank you for your help, I have updated my repo.

Unfortunately, the answer came a little late for my task, but I will keep the sample available for others. Ardenne The sample seems to be offline - could you make it available again please? I am trying to use this. But when building the app, getting these errors. What could be the issue? Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.

Post as a guest Name. Email Required, but never shown. The Overflow Blog.

Subscribe to RSS

Q2 Community Roadmap. The Unfriendly Robot: Automatically flagging unwelcoming comments.GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Have a question about this project?

Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. Current behavior I don't understand why when I resize my table add big scrollbar horizontal. Here you can see gif I tried to recalculate table whe resizing this event is fired but nothing change to my table:.

Side note: That will only work if you don't have horz scrolling at all. Can you make a plunkr demo? So ideas it could be:. Something like this:. It also happens with a left sidebar, which has a css transition on the width to scroll in from the side. I tried to fix that by calling this. I also have this useless scrollbar event when my content fit the size of the container. I also had to use the workaround:. Also there is a transitionEnd event listener which calls recalculate on the datatable, but has no effect.

I would expect recalculate to adjust the datatable to the new width. To make it better visible, I added a border and overflow visible to ngx-datatable and a background-color to datatable-scroller. Guys, I found a workaround. The problem is that resizing the window makes the datable recalculate and then the datatable-scroll gets smaler then the datatable-row. The idea to fix is when resizing the screen we copy the size of the row to the scroll.GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. ThakkarKhushbu I can't evaluate till you remove mixed mode from the plunker example.

The data source shall be https for plunker for security reasons. ThakkarKhushbu I might have found the bug. This library moved to OnPush change detection at version ViewChild 'shipperdatatable' table: any. I had the same issue. Each object in my columns definition only had the name, you must provide the prop too. The source code in the demos only sets "name" and leaves out the "prop" value. That is where the confusion occurred. Skip to content. Dismiss Join GitHub today GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Sign up. New issue. Jump to bottom. Copy link Quote reply. I'm submitting a Please tell us about your environment: Table version: 0. This comment has been minimized. Sign in to view. Facing same issue NGX-Datatable having data but displays nothing. Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment.


Posts created 1

thoughts on “Ngx datatable draggable rows

Leave a Reply

Your email address will not be published. Required fields are marked *

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top