Comments (4)
I was able to reproduce the behavior. The fix after upgrading to 1.7.x is to set "label" to html
renderItem: item => {
return {
value: item.name,
label: "<span ng-bind='item.name'><span>"
}
},
from angular-auto-complete.
Is it possible to create a Fiddle/Codepen for this? I am curious why it does not fail in other places where that.options
is accessed.
from angular-auto-complete.
Hi Vikram, thank you for the merge.
Update on my situation: while trying to reproduce the issue in a fiddle I wasn't able to anymore. When looking deeper into it, I realized the issue happened on v1.6.4, not on v1.7.2. So, logically, I updated the project dependency to v1.7.3 but it looks like there are breaking changes between v1.6.4 and v1.7.3.
I tried to update our code to work with with v1.7.3 but it looks like it's a no go: I can't seem to find a way to make the input show a label (it shows [object Object]
), which in v1.6.4 was achieved by using:
...,
renderItem: item => {
return {
value: item.name,
label: item.name
}
},...
So, what I ended up doing was: reverted my fork to v1.6.4, applied the lil' fix and installed the package from my fork. If there's any way to achieve the above in latest version, i'd be happy to update.
Thank you.
from angular-auto-complete.
Yes, v1.7.0 had major refactoring. I added support for compilation (ng-bind
) for the "label". But I did account for backward compatibility. Can you create a simple Plunkr using v1.6.4? I want to see what I broke...
I don't see why label would show [object Object]
. See example using renderItem
callback on the demo site. See "Custom List Using renderItem Callback".
from angular-auto-complete.
Related Issues (20)
- Please mention steps how to make is runable. HOT 2
- Error during installation HOT 8
- Error when there is empty result array HOT 2
- Android Back Button Issue HOT 3
- keyword search method HOT 1
- missing underscore dependency HOT 2
- Please provide The "No Result Match" message when no matches are found in list HOT 1
- Please provide access to ng-repeat current object access. HOT 3
- Dropdown dont close on unfocus HOT 3
- Rendering item doesn't show in IE11 HOT 6
- Bower error HOT 1
- CSS is too specific HOT 1
- Nested http.get calls
- Demo site is not working, Please include the documentation in readme.md HOT 1
- Label on input is not updated on Angular 1.7.8 HOT 2
- How can i use event argument in data func
- ctrl.container.has is not a function HOT 6
- Memory leaks HOT 1
- Please mention steps how to make is run. HOT 1
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 angular-auto-complete.