Closed dzena closed 3 years ago
Hm, there are still some issues to be addressed. Please do not merge yet.
@AnthonyNahas I think we should be good now. Please take a look and let me know if you think the proposed solution makes sense.
@dzena thanks for contributing
…add "excludedCountries" that expects an array of countries to be excluded from the list.
This commit addresses couple of issues and introduces one new feature (exclude countries).
There is a problem if we want to pass [value]="[{alpha2Code: 'DE'}]". In this case, Input() setter tries to lookup "alpha2Code" in the "countries" array, but fetching the countries is async, and at the point of looking up, the array is "undefined".
Also, Input() "value" depends on Input() "countries", so if a user passes "countries" and "value", it can happen that "value" is passed before "countries" so lookup will not work as well.