Comments (6)
Hi @WideAwake,
Currently behavior is you should click enter button to apply changes. I think it may cause issues on mobile devices.
from vsgoogleautocomplete.
is this issue solved ? i'm also facing same issue(empty the input)
from vsgoogleautocomplete.
Will be solved asap
from vsgoogleautocomplete.
i've had the same problem and fixed it forcing the clear of autocomplete model:
the 'autocomplete' parameter is the input where autocomplete is located;
var input = angular.element(document.querySelectorAll('input[name=autocomplete_location]'));
clearAutoCompleteModel(getAutoCompleteObj(input[0]));
function getAutoCompleteObj(element) {
for (var key in element) {
if (key.indexOf('jQuery') == 0 && element[key].$vsGoogleAutocompleteController)
return element[key];
}
}
function clearAutoCompleteModel(autocomplete) {
let auto = autocomplete;
let modelCtrl = auto.$ngModelController;
let viewValue = modelCtrl.$viewValue == "" ? '' : modelCtrl.$viewValue;
if (!viewValue) $scope.jobPosition = new JobPosition();
$timeout(function () {
$scope.$apply(function () {
modelCtrl.$setViewValue(viewValue);
modelCtrl.$render();
});
});
};
this make me able to clean input after the selection of one place inside autocomplete. i think it's easy to fix it directly inside the code. Obviusly there'll be an issue with the required validation, that doesn't accept any empty value.
Now i'm not able to give time to this issue, but i would like to make a PR.
from vsgoogleautocomplete.
What line should I put this in? because I'm getting a Cannot read property '$ngModelController' of undefined
in my console.
from vsgoogleautocomplete.
Was this problem ever fixed? It still persists today @vskosp
from vsgoogleautocomplete.
Related Issues (20)
- Issue with Injector HOT 5
- address components for multiple input boxes. HOT 1
- Warning: The implementation for types in text search requests is changing
- Angular 2 support? HOT 1
- Trigger Autocomplete HOT 1
- validators don't allow empty input
- Styling is off in Firefox HOT 1
- How to i access latitude and longitude in controller
- Possible Bug : ng-change doesnt work with this plugin HOT 1
- administrative_area HOT 1
- Can't make input empty after selecting place + validation issue
- Clearing the field but the value returns
- Not work with IONIC v.1.0
- Selected address is not placing in the text field
- Not displaying correctly in uiModal Template HOT 1
- Not filtering by cities
- How do you support event on a place selected from the list? HOT 2
- Please provide an expanded demo.
- Brooklyn is not fetched as a city.
- 2 location textboxes overriding with new one
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vsgoogleautocomplete.