I am using angular2-multiselect-dropdown
for multiple dropdown in angular4. It's working perfect while creating the records, but not working fine during updation.
All previously selected values should be checked, and not able to select twice. but here it's not already selected and one can select same value again.
attaching screenshot, please let me know what can i do. will update my code if required.
Thanks in advance.
I got the solution, Posting here as answer so that no one finds the same issue. It was a minor change that makes me crazy for hours. Here is the solution, the main difference was id for edit is string and for create is integer. After making it similar problem is resolved. Angular2-multiselct is really awesome.
DataList on Edit:
[{id: "1", itemName: "Text1", value: "1"},
{id: "2", itemName: "Text2", value: "2"},
{id: "3", itemName: "Text3", value: "3"}]
DataList on Create:
[{id:1, itemName: "Text1", value: "1"},
{id:2, itemName: "Text2", value: "2"},
{id:3, itemName: "Text3", value: "3"},
{id:4, itemName: "Text4", value: "4"},
{id:5, itemName: "Text5", value: "5"}]