Closed martinobordin closed 7 years ago
@martinobordin You are right, I should have returned only values. I will do this soon(tomorrow probably). I will close and comment once it is done.
Ok thank you very much @matsura . I've got other suggestion (not prioritary though):
Thanks a lot for your component
@martinobordin I have implemented ngModel and formControlName to contain array of values. If you have a need for objects you can get the from outputs on the component. I am very thankful for testing my component and giving me suggestions. If you can, make a new issue for each suggestion and put label 'enhancement' on it. I will implement both of these, but I need more details for the second one(expose the text).
Thank you very much!
@matsura I created the two issues. Sorry but I didn't understand well what you mean. I could I get in the formControlName only the array of strings instead of objects?
@martinobordin Yes, formcontrolname or ngmodel now give you an array of values.
@matsura Hi, when I select the items now I get the array of values, great. However it doesn't preselect the items.
Scenario: I've got an array of available items (100 elements) and an array of preselected items (15 elements) . Expected: It should shows in the "Available items" listbox the former array and in the "Selected items" array the latter. Actual: It only shows "Available items" listbox, the "Selected items" listbox is empty.
@martinobordin It will be fixed later today. Thanks for patience.
@martinobordin Preselection is now possible. You have to pass an array of values.
Now it's perfect..thanks you very much for the great (and quick) improvements
@matsura There are some debugger left in the code..if you could remove them in the next release..thanks
@martinobordin Debugger removed, sorry about that.
@martinobordin Can you help me how to populate values in selected Items listbox? I have tried with ngmodel , but no luck. It will be very helpful if you provide an example.
Can You prepare a sample on stackblitz?
Il mar 25 set 2018, 21:56 rakesh00005 notifications@github.com ha scritto:
@martinobordin https://github.com/martinobordin Can you help me how to populate values in selected Items listbox? I have tried with ngmodel , but no luck. It will be very helpful if you provide an example.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matsura/ng2-dual-list-box/issues/3#issuecomment-424479808, or mute the thread https://github.com/notifications/unsubscribe-auth/ABrn2MIdnKDI9cxwlfSICKVFs7KazO7zks5ueopigaJpZM4OZY5V .
Hi @matsura, sorry to bother you. Is it possibile to bind to a simple array of strings instead of an objects?
I explain better. I have a list of objects that I use to fill the listbox, using [data] property and formControlName (thanks for your recent fix).
The selection works fine, but instead of an array of objects I would like to have as result an array of strings:
e.g: I would like to have this
["Customer1", "Customer"]
instead of[{ "value": "Customer1", "text": "Customer1" }, { "value": "Customer2", "text": "Customer2" }]
Is it possible?