Hi everyone !!
I’m using Select2 v4.0.3 implemented in Angular 5 application.
Because of the application’s requests, I needed to bind whole Angular object/model to dropdown’s id (value) and to do that I had to stringify my objects.
So, now the dropdown works fine: we can see object’s title as a text and whole object is stringified as a dropdown’s id (value).
The problem is that somewhere in Select2.js script there is a compare of a selected Id values and it doesn’t recognize my stringify object so it always selects first element and not binded one.
I know that this is not native Select2 behaviour but improvisation, but I really need help to make this work, so if there is someone willing to help me find the line where this can be fixed, I will be very grateful !!
Best Regards,
Josip