Comments (8)
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.
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.
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.
@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.
@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.
@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.
@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.
I've closed this issue. Feel free to comment it, so we could reproduce and fix the problem.
from jcf.
Related Issues (20)
- Wrong selectbox rendering after reset form with scrollable.js HOT 1
- full-text search for select box
- Keyboard Tab to switch to next form controll not working
- scrollable looses styling on ios
- Default number input with step 2 on touchpads
- Issue with custom scroll on iOS HOT 1
- programmatically close dropdown when going out of focus HOT 2
- Select options disappear after programmatically trigger hideDropDown HOT 2
- How to unbind element with JCF. HOT 1
- Can I turned off init jcf-scrollable on resize? HOT 1
- How can I do scrollTop? HOT 1
- How to hide the option from JCF dropdown when native select is hidden using method hide() HOT 1
- onchange of select HOT 1
- Have to use small hack with v-model checkboxes on vue.js 2.x HOT 1
- Selection popup dissapears after clicking on dropdown element in Firefox on mobile HOT 1
- How can I close select dropdown programmatically? HOT 2
- compatibility jquery 3
- How to exclude elements from rendering HOT 1
- Ajax loading HOT 3
- JCF js library does not allow smartphone wheels (IOS device ) on multiple selection select fields
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 jcf.