Comments (6)
InColumns doesn't deal with DOM, CSS or form tags. What is the actual result returned by InColumns and what did you expect it to be?
from in_columns.
Been pondering this, and I think I might know what's happening.
Currently, InColumns returns columns distributed like
a e i
b f j
c g
d h
You probably want them distributed like
a e h
b f i
c g j
d
In the first distribution, DOM floating would cause 'd' to be floated next to 'g' and so forth, which would probably mess things up like you're seeing.
Can you confirm this?
from in_columns.
Looks like I misunderstood the usage of your library then :) Cause yes was looking at a way to use it directly with collection_check_boxes
.
Thanks for having a look at my question anyhow
from in_columns.
InColumns is used with Arrays - what you do with the results is up to you. I cannot help you debug CSS and markup you've added around the results, but I can help you debug the actual results from the library.
I still think the issue you are seeing is the one I describe above, but I have no immediate way of verifying it as you have provided no output that shows what InColumns actually return.
from in_columns.
I have released a new version that uses an equal height distribution algorithm. I suspect it will make it possible to use InColumns for you needs, so please check it out.
Do note, though, that the API has changed a bit and you might need to reject nil values:
= f.collection_check_boxes :city_ids, InColumns.columnize(@cities, 3).flatten.compact, :id, :name
from in_columns.
Yep that's it :) Good job
Nice to see I contributed a bit: I can recognized enhanced parts of the code I posted on stackoverflow
Thanks!!
from in_columns.
Related Issues (2)
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 in_columns.