Giter Club home page Giter Club logo

Comments (8)

inferpse avatar inferpse commented on June 9, 2024

Hi, @GBora !
What version do you use? How to reproduce the issue?
I've created plnkr to test the issue with the most recent version of JCF module - it seems to work properly.

Please check that your <li> inside the custom dropdown has minimal height set in CSS.

from jcf.

GBora avatar GBora commented on June 9, 2024

Hi @inferpse

I'm using version 1.2.0 installed via bower.

Your plunkr is quite different from my sittuation in that I change the options via angular, so we're talking a controller and a service making the http call in the mix.

I'll check my styles and see if a minimal height helps.

from jcf.

inferpse avatar inferpse commented on June 9, 2024

Ok, I'll be waiting for your feedback. It would be great if you could provide some piece of code/data you use to populate select options.

from jcf.

GBora avatar GBora commented on June 9, 2024

@inferpse I've checked and when I change the options with angular, there are no li elements at all they're not being generated even though I'm using jcf.refreshAll().

http://codepen.io/anon/pen/ZbEVqO

This is how I'm updating the options the angular part, I started doing it on codepen but then I noticed I can't add jcf there to complete, but the ideea is after I get the new data I refreshAll and not new options are generated.

from jcf.

inferpse avatar inferpse commented on June 9, 2024

@GBora I've forked your pen and added JCF module to test the issue - http://codepen.io/anon/pen/VvYwYw
According to the angular docs it's better to use ng-options directive instead of <option ng-repeat="..."> for performance reasons, so I've changed that in the pen.

I can't reproduce your issue with blank dropdown. Could you modify the pen, so we can see it?

from jcf.

GBora avatar GBora commented on June 9, 2024

@inferpse Thanks for forking the pen.

Unfortunately the real behaviour of the app is more complex, in that I'm making a lot of calls and manny dropdowns are getting new options, might that have something to do with it ?

Also I noticed you're not calling refreshAll to redraw the dropdown is that a mistake on my part ? As I'm bring in new data I have to refresh a lot of jcf components so that's why I'm using the method.

I'll close the issue as it's obviously something wrong with the structure of my app and not with the library but I'd like to hear your thoughts.

from jcf.

inferpse avatar inferpse commented on June 9, 2024

@GBora Do you use jcf.angular.js file in your Angular project? This is simple directive which is designed to initialize, refresh and destroy custom form elements automatically, so you don't need to use JCF API at all (check out the source code of that directive and my pen). If you're not using it - try to remove all jcf.replaceAll() and jcf.refreshAll() methods and simply add jcf attribute to the form element.

You can help me to understand why the dropdown is broken if you'll inspect the styles and structure of the dropdown.

from jcf.

inferpse avatar inferpse commented on June 9, 2024

I've closed this issue. Feel free to comment it, so we could reproduce and fix the problem.

from jcf.

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.