Hi,
I found an opened issue from may on stackoverflow, can someone help us ?
https://stackoverflow.com/questions/439 ... g-picklist
Issue with not empty target list at initial (PickList)
It should work properly with default selected items too. Please create a github issue in the issue tracker. Don't forget to provide the plunker example.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/
___________________
Sudheer Jonna
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/
___________________
Sudheer Jonna
-
- Posts: 1
- Joined: 24 Jul 2017, 19:08
I know this is a few months old, but hopefully it helps someone! I ended up doing a filter on the source array like so:
I made sure to call this code after I had already subscribed to a few requisite objects (namely, I had to get the list of all roles available in my system, and I had to get the desired user including his/her inherited roles).
Then, in the template side, I bind [source] to availableRoles and [target] to my user object's userRoles property.
Code: Select all
this.availableRoles = allRoles.filter(userRole => {
return !this.user.userRoles.some(x => x.id === userRole.id && x.name === userRole.name);
});
Then, in the template side, I bind [source] to availableRoles and [target] to my user object's userRoles property.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 26 guests