-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
PickList: move all items from target to source issue #2573
Comments
It appears that
|
@bdavidhicks Can you provide an example how you did this with your model lists? Thanks |
@cagataycivici Can you take a look at this? I think @bdavidhicks has found the problem in your picklist code.. Thanks |
@Mrtcndkn Take over please. |
Seems by design, onMoveToSource first passes the items that are moved and then updates the list, otherwise you can't know about the items that are moved to source. One idea could be another callback like onMoveAllToSource and onMoveAllToTarget? Thoughts? |
That would fix my problem because now it's very hard to check wether I moved one item or all to the source. I need this because I want to check if the target list is going to be empty on a move. |
Thanks, do you expect onMoveToSource to be called in this case, I guess we should not call onMoveToSource and onMoveAllToSource at the same time so that we can separate events. |
My opinion is to separate them, but I'm no expert though :) |
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
I had troubles creating a plunkr with primeng version 2.0.5 in combination with picklist from your plunkr, so I hope my explanation is enough :)
Current behavior
I defined two events on my PickList (onMoveToTarget, onMoveToSource). When I log my source and target list in these events everything works fine, except when moving ALL items from target to source. In that case the source and target list is not updated.
Example: I have 3 items in source and 2 in the target list. When I click "move all items to source", the target list still contains 2 items and the source list 3 items.
In all other movements the source/target list are updated during the event.
Expected behavior
When I move all items from target to source, the target list and source list should be updated during the event.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Language: [TypeScript 2.0.10]
Node (for AoT issues):
node --version
= v7.5.0The text was updated successfully, but these errors were encountered: