Giter Site home page Giter Site logo

Comments (4)

vickramravichandran avatar vickramravichandran commented on August 17, 2024 1

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.

vickramravichandran avatar vickramravichandran commented on August 17, 2024

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.

andrei-gheorghiu avatar andrei-gheorghiu commented on August 17, 2024

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.

vickramravichandran avatar vickramravichandran commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.