Not able to use getCities method
See original GitHub issueHey guys, I’m trying to use the getCities
method but I’m getting:
Uncaught TypeError: (0 , _brazilianUtils.getCities) is not a function
error on the console. I installed the lib using yarn
and I’m importing it in my js
file as below. What could be the issue?
import { getCities } from '@brazilian-utils/brazilian-utils';
...
const Methods = {
async init() {
await Methods.getCitiesList();
}
getSelectedOption(sel) {
var opt;
for (var i = 0, len = sel.options.length; i < len; i++) {
opt = sel.options[i];
if (opt.selected === true) {
break;
}
}
return opt;
},
async getCitiesList() {
Elements.selectState.addEventListener('change', (el) => {
const selectedState = Methods.getSelectedOption(Elements.selectState).value;
const citiesList = getCities(selectedState);
console.log(citiesList);
});
},
};
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Problem with Spring 3 + JSON : HTTP status 406?
But I get HTTP 406 error stating the following when i run it: 406 Not Acceptable The requested resource is only capable of...
Read more >Issues · harpreetkhalsagtbit/country-state-city - GitHub
I am unable to get cities for UK. I am using City.getCitiesOfState(countryCode, stateCode) method to get a city. #99 opened on Jul 11...
Read more >Calling function from Controller in cshtml file. - Microsoft Q&A
Hello What i would like to do is call my GetCity method in my controller class once the user has submitted an input...
Read more >Why locationManager is not called … | Apple Developer Forums
The issue is that the first time I call the getZipCode() or the getCity() methods I get an empty string. Here is how...
Read more >Why Local Variables are Bad for Tuning Stored Procedures
GetCities AS RETURN 0') GO ALTER PROCEDURE dbo. ... (Note: I'm not saying you should use temporary stored procedures in your production code...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve tried here and managed to update now! Thank you.
Please, try again. I updated the latest tag on NPM right now. You can check here: https://www.npmjs.com/package/@brazilian-utils/brazilian-utils (just click on version).