Multiselect component with reactive forms
When multiselect component used with reactive forms it is not working.
Is this going to be resolved with 4.0.0-Final? Multiselect isn't closing when onBlur fires.
There is no specification, what is not working. It is working for us. Make sure you FormGroup has a correct type for MultiSelect values. It must be an array not string.
What isn't working is after selecting a value, the dropdown modal isn't going away. It stays open and I have to click X to close it. Clicking anywhere on the page or in another input isn't hiding the the list of values. The blur event isn't firing.
Do you have any errors in the console? Do you supply a correct model to the FormBuilder? Meaning the value for this field must be an array of strings since you can select multiple options. Maybe drop here some code. I have just finished a part of our app with this component with no problems, I believe we can find also a solution for you.
The issue turns out to be related to ChangeDetectionStrategy.OnPush. Control works correctly with Default strategy. I notice similar issue with p-calendar control - I have to click a date twice for the control to close. I am using PrimeNG 4.0.1 and NG 4.1.3.
I am sorry, but I was unable to reproduce the same issue. Even with onPush detection strategy and Reactive Forms and the same version of ng & primeng the Multiselect and also Datepicker works as a charm.
Unable to replicate, please provide a test case based on plunkr below and we'll review again.
http://plnkr.co/edit/Wj39h1?p=preview