File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,10 @@ export default {
229229 type: Boolean ,
230230 default: false ,
231231 },
232+ allCountries: {
233+ type: Array ,
234+ default : () => allCountries,
235+ },
232236 defaultCountry: {
233237 // Default country code, ie: 'AU'
234238 // Will override the current country of user
@@ -322,11 +326,11 @@ export default {
322326 }
323327
324328 if (this .ignoredCountries .length ) {
325- return allCountries .filter (({ iso2 }) => ! this .ignoredCountries .includes (iso2 .toUpperCase ())
329+ return this . allCountries .filter (({ iso2 }) => ! this .ignoredCountries .includes (iso2 .toUpperCase ())
326330 && ! this .ignoredCountries .includes (iso2 .toLowerCase ()));
327331 }
328332
329- return allCountries;
333+ return this . allCountries ;
330334 },
331335 sortedCountries () {
332336 // Sort the list countries: from preferred countries to all countries
@@ -482,7 +486,7 @@ export default {
482486 .filter (Boolean );
483487 },
484488 findCountry (iso = ' ' ) {
485- return allCountries .find (country => country .iso2 === iso .toUpperCase ());
489+ return this . allCountries .find (country => country .iso2 === iso .toUpperCase ());
486490 },
487491 getItemClass (index , iso2 ) {
488492 const highlighted = this .selectedIndex === index;
You can’t perform that action at this time.
0 commit comments