maazali / ember-cli-sortable Goto Github PK
View Code? Open in Web Editor NEWEmber CLI addon for RubaXa's sortable plugin
License: MIT License
Ember CLI addon for RubaXa's sortable plugin
License: MIT License
I have a situation where I want to make a list of images sortable. The collection of images is using sortBy
to maintain order using a position property. This gets stored on the backend, and I need to update the server with a contiguous sequence of positions every time you re-order the list.
Getting the old and new indices in the onItemMoveAction isn't very helpful, because it only lets me update that position property on the single item dropped. Since I'm using a sorted collection, every time I use this.get('images')
they get re-sorted according to their position
.
Passing the collection
in as an argument to the action solves this problem, because then I have the newly ordered collection of images. I can update the position
property on all of them, and then make my request to the server to persist the ordering.
Would you accept a PR for this?
First off, thanks for converting this to Ember.
I used this library outside of Ember and it was able to do everything that I needed it to, but I am unable to figure out how to get this addon to work the same way. Here is what I have:
I have several dynamically added groups, each with fields within them. I need to be able to reorder the groups, as well as the fields. I also need to be able to drag the fields from one group to another, dropping them in where I need them.
Is there a way to get this setup using this addon?
Thank you very much!
Get error message when try dragging and dropping.
The message is Uncaught Error: Assertion Failed: You must use Ember.set() to set the
0property (of aaa,bbb) to
bbb.
Hi!
I'm trying to make use of ember-cli-sortable
. I do see a list of items, but no styles are applied to the list and i'm unable to sort it: when i try dragging an item with the mouse, text is selected instead.
Any suggestions?
Maybe related to having Ember moved away from bower_components, but it's throwing this error:
Error: Cannot find module '/bower_components/ember/ember-template-compiler'
at Class.module.exports.htmlbarsOptions (/node_modules/ember-cli-sortable/node_modules/ember-cli-htmlbars/ember-addon-main.js:70:25)
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.