Comments (8)
Could you create a jsbin or plnkr example?
It works fine as you can see in the example page.
http://ghiden.github.io/angucomplete-alt/
For example 1, you select a country and then the result shows up below the input field.
Then, if you delete a character, the result disappears.
Isn't that what you see?
from angucomplete-alt.
Hi,
Thanks for the reply.
No, when I delete the selected value my model still displays the selected value even though I have cleared out the autocomplete field.
At the moment I can't do plunker as it is blocked at my work so here is the relevant code.
<div data-ng-controller="template-controller" >
<div class="form-inline" data-ng-repeat="item in tdata.fields">
<div class="row-top-margin" data-ng-controller="template-item-controller" style="padding-bottom: 5px;">
<div angucomlete-alt id = "{{ item.Field.Value }}{{ $ index }}"
data-ng-show="types.code"
data-ng-change="codeChange()" // Does not get called.
placeholder="{{ item.Field.Description }}"
pause="300"
selected-object="selectCallback"
remote-url= "@Url.Action("GetReferenceData", "Search")?field={{ item.Field.Value }}&reference={{ item.Field.Reference }}"
title-field="Description"
min-length="2"
initial-value="{{ item.Description }}"
input-class="form-control form-control-small"
auto-match="true"
match-class="highlight">
{{ item.CodeValue.Value }} / {{ item.Description }} (This does not change when I delete the value)
For the selected-object callback. Is only called when I select an item from the list
$scope.selectCallback = function (result) {
if (result != null) {
$scope.item.CodeValue = result.originalObject;
$scope.item.Description = result.originalObject.Description;
}
else {
{
$scope.item.CodeValue = null;
$scope.item.Description = "";
}
};
Thanks
Trish
from angucomplete-alt.
It looks quite legit to me.
But you have ng-repeat and in each repeated block, you have a controller, then angucomplete-alt.
I hope you are not messing around with scope.
ngChange won't affect anything for sure as there is no model.
Maybe if you can create a quick demo at jsbin or plnkr from your home, that might help me understand what's going on.
from angucomplete-alt.
I believe that you @Trish00 have resolved the issue so I'm closing this now.
from angucomplete-alt.
May I please know how this issue is resolved? Because at the moment am facing the same issue. Whenever am clearing an input field and making a post request I can see that there is no change being reflected and it keeps the same value as before without updating empty strings.
from angucomplete-alt.
I also need the solution related to this issue.
Please send it at my email id .
from angucomplete-alt.
You can attach a callback function to selected-object and you can manipulate the changes in that function. I have done that and it resolved my problem
from angucomplete-alt.
I am using the selected-object callback, but the parameter 'selected' is always 'undefined' if user doesn't select a value from the dropdown list on UI.
How can I know if the user set the value as empty on UI in autocomplete-alt?
from angucomplete-alt.
Related Issues (20)
- AJAX errors are sometimes ignored (httpErrorCallbackFn and remote-url-error-callback)
- Autocomplete-alt
- Console error message
- Angucomplete-alt
- Filtered result disappearing In IE if the data is large
- Tap on Autocomplete-alt dropdown causes updating results on android HOT 6
- Angucomplete-alt : one error results from the $injector being unable to resolve a required dependency after adding the angucomplete-alt module to my Angular App file, e.g.
- After adding the angucomplete-alt module to my Angular App file, I got an error 'being unable to resolve a required dependency' on console. What's wrong?
- Duplicate ng-focus on input
- .title not working when selected-object is a function
- How to pass index into selected-object HOT 1
- If data comes in binary format in name filed then it is going to be ng-invalid.
- Error: [$injector:modulerr]
- Unable to get the data with proper format in HTML in angular js
- Using arrow down starts from the second item HOT 1
- Using arrows may leave inconsistent value in the input field HOT 1
- RemoteUrlErrorCallback is undefined
- Address Auto Complete not working on Mozilla Firefox but working on Chrome and IE
- Custom search doesn't trigger function within controller HOT 1
- *.md
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 angucomplete-alt.