Skip to content
This repository has been archived by the owner on Nov 27, 2019. It is now read-only.

Drag items in nested ng repeat filtered #84

Open
GDuchemin opened this issue Apr 27, 2016 · 23 comments
Open

Drag items in nested ng repeat filtered #84

GDuchemin opened this issue Apr 27, 2016 · 23 comments
Assignees

Comments

@GDuchemin
Copy link
Contributor

Hi luckylooke !

Here is a JSfiddle to test nested ng-repeat filtered: https://jsfiddle.net/hLsuege1/
As you see and as your documentation, there is no dynamic model for containersFilteredModel option of dragularInstance.

I don't know how to have dynamic model for containersFilteredModel (obviously based on the number of column). Number of column is variable because i can add / remove column. Same for rows.

Every way to do that will be helpful ;)

Thank you !

@aneurysmjs
Copy link

yeah, I having the same issue, for example when using nested arrays if you try to sort them with filters in the html, it works just as it looks but when you start dragging the sorted nested array, it doesn't drag properly you got unexpected results, so by altering in this case 'sort', it has to be directly on the source array right? not by using filters

@GDuchemin
Copy link
Contributor Author

@blackendstudios I tried to filter the collection in controller and push it in an array for model, i doesn't work. Even if I kill dragular and instantiate it again with this filtered array, i have a strange bug which allow user to drop items in their container. I think the model and filtered model is not clean by this way but I really don't know why.

The only way I currently find to patch this issue its to reload my route (not my location) at each drop, to keep filtered array, pending on this feature ;)

@aneurysmjs
Copy link

aneurysmjs commented May 27, 2016

@GDuchemin but by reloading the state isn't too much 'overhead' in order to satisfy our app requirements? maybe 'dragularService' can have the functionality of 'containersFilteredModel' being configurable like set the amount of models by referring then by the index of each nested array...or I don't know jajaja I just can't imagine that, even at the docs, the example of the filtered model isn't working

@GDuchemin
Copy link
Contributor Author

GDuchemin commented May 30, 2016

@i don't know... I've tried anything ! the functionality of 'containersFilteredModel' has arrays which contain filtered model, and i can clean them and push again on them but i have some trouble. I'm waiting for a fix doc and maybe a fix feature.

@luckylooke
Copy link
Owner

Hi guys, it seems that nested repeats with filtering is getting to be viral, I hope I will have some time soon to have look at it. Thanks for patience.

@GDuchemin
Copy link
Contributor Author

Thanks for your help lucky.

@amonsot890
Copy link

amonsot890 commented Oct 17, 2016

hi good day @luckylooke , i'm currently using dragular for our app, but it seems that using it with nested ng-repaeat is a problem, can you help me solve this problem . :) thank you.

@luckylooke
Copy link
Owner

@amonsot890 nested repead is not problem since you are not filtering the parent repeat see example. Filtered parent is problem for now, I dont have much time for solving it right now :/

@amonsot890
Copy link

amonsot890 commented Oct 17, 2016

@luckylooke thanks for the reply but i forgot to mention that i'm doing it with filters,

here is my html code,

image

i wish i could show you in person the whole code structure that i am working right now. Thanks a lot..:)

@luckylooke
Copy link
Owner

luckylooke commented Oct 17, 2016

Ok, as I mentioned before, nested filtered ng-repeats arent supported right now. Sorry :/

@GDuchemin
Copy link
Contributor Author

@luckylooke, did you fix something or no-filtered parents worked before ?

@luckylooke
Copy link
Owner

@GDuchemin I didnt move with this issue, but non-filtered parents ng-repeat should work. Filtered ng-repeat doesn't support child ng-repeats as it lost connection with true model, that is the problem from point of implementation. Because filtered repeats works with cloned model.

@GDuchemin
Copy link
Contributor Author

Look at my fiddle on first post, i just filtered child ng-repeat and it's not working. To test, just try to delete by clicking in (X). Bad item is deleted.

@luckylooke
Copy link
Owner

Ok.. I forgot.. so it seems to be not working too.

Dňa 17.10.2016 15:43 používateľ "Guillaume Duchemin" <
notifications@github.com> napísal:

Look at my fiddle on first post, i just filtered child ng-repeat and it's
not working. To test, just try to delete by clicking in (X). Bad item is
deleted.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#84 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADfY_lCxGwc5lnKvo10knmhY8Q0noSl5ks5q03uPgaJpZM4IQ7wK
.

@GDuchemin
Copy link
Contributor Author

Do you think that you can fix it soon ?

@luckylooke
Copy link
Owner

It depends, what is soon for you :) I can only guess.. :/

On Mon, Oct 17, 2016 at 4:37 PM, Guillaume Duchemin <
notifications@github.com> wrote:

Do you think that you can fix it soon ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#84 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADfY_ri-4AabniiNoKO3qvg09pBGyYSgks5q04g4gaJpZM4IQ7wK
.

@amonsot890
Copy link

@luckylooke thank you very much.. great work by the way.

@luckylooke
Copy link
Owner

@GDuchemin Can you check if this update of your fiddle is what you expected? https://jsfiddle.net/rjLoyagm/2/ Thanks

@luckylooke
Copy link
Owner

I was just looking the source code of library, and I didn't found the reason why nested filtered ng-repeats shouldn't work. It seems that it is just very hard to implement. So I will create such example with detailed comments soon. Maybe I bring more light into the problem. Thanks for patience.

@luckylooke
Copy link
Owner

@amonsot890 please try to reproduce your problem in fiddle, maybe I can help you with your problem too ;)

@amonsot890
Copy link

@luckylooke sorry for the late response, hmm ill try. and one more thing i have the same problem with this example https://jsfiddle.net/rjLoyagm/2/ , but when i try to remove the containersModel option, it worked fine on my side, but when i tried it with websockets and tried emiting with a group of people. it seems that it cant contain the whole thing, i'am trying to configure some of the works but still can't solve the problem. hmmm.

@amonsot890
Copy link

@luckylooke thanks, by the way for your effort and help. really appreciate it.

@luckylooke
Copy link
Owner

luckylooke commented Oct 21, 2016

@amonsot890 I am so soory, but I am lost in your comment. Could you please send me step by step for reproducing the problem from start to the point where app doesnt act as expected. Something like (example):

  1. Click on button "some button"
  2. Drag from item "itemName" from 2nd column to "itemIn3rdColName" place in 3rd column
    expecting to "itemName" disapear from 2nd column, and show abbove "itemIn3rdColName" in 3rd, BUT "itemName" is still in 2nd column.

Please try to give me such instructions to reproduce the problem, like for dummies :D It would be very important for solving the problem. Thank you very much for your patience ;)

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

No branches or pull requests

4 participants