cyclejs-community / cyclejs-sortable Goto Github PK
View Code? Open in Web Editor NEWMakes all children of a selected component sortable
License: MIT License
Makes all children of a selected component sortable
License: MIT License
Hi there, do you have any plans to support touch devices? Thanks!
If you take the example in cyclejs/examples/http-search-github
, I tried to add this library by including this line:
// Convert the stream of HTTP responses to virtual DOM elements.
const vtree$ = sources.HTTP.select('github')
.flatten()
.map(res => res.body.items)
.startWith([])
.map(results =>
div([
label('.label', 'Search:'),
input('.field', {attrs: {type: 'text'}}),
hr(),
ul('.search-results', results.map(result =>
li('.search-result', [
a({attrs: {href: result.html_url}}, result.name)
])
))
])
- );
+ ).compose(makeSortable(sources.DOM, { restrictMovementArea: '.search-results' }));
Apparently it added .x-sortable-item
to all of the elements under the div. I would expect only li
elements under ul.search-results
would get the .x-sortable-item
.
I have to use adapt, but I'm not completely sure if xs.fromObservable
just works with all stream libs or if I have to do something else for the incoming stream
Maybe @staltz can help here?
In V2.2.2, if there are no children in the parent element to start and no handle
option configured the lib crashes since it can't find a child from which to extract the child class...
I tested in Firefox desktop and if I drag and the mouse goes out of the viewport (e.g. if it goes near the address bar) then my mouseleave isn't computed anymore and it's stuck with dragging.
Would it be possible to host some examples for users to play with?
Thanks! Looking forward to to trying this library
Olly
Fingure out how to notify the user of makeSortable that the order changed.
Ideas:
"main": "makeSortable.js"
should be "main": "build/makeSortable.js"
I believe. Otherwise, import {makeSortable} from 'cyclejs-sortable'
won't work as the bundler can't find cyclejs-sortable
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.