Giter VIP home page Giter VIP logo

ractive-decorators-sortable's People

Contributors

artskydj avatar martinkolarik avatar rich-harris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ractive-decorators-sortable's Issues

Input boxes inside sortable always get focus at beginning of input box

After enabling sortable I am unable to modify the default value for input boxes

What happens is that the cursor gets focus at the beginning of the value for an input box. So if there is a value defined in the template, then I cannot edit it!

Example:

ul
{{#datalist}}
li class="itemwrap" decorator="sortable"
div class="content_item_entry"
div class="item_entry_grip"
i class="fa fa-bars text-muted" /i
/div
div class="item_details_container"
input class="item_entry_section" value="{{title}}"/
/li
{{/datalist}}
/ul

The input's default value cannot be edited.

Thanks,

npm publish

@Rich-Harris I'm updating this for the latest ractive version. Can you give me publish rights for npm?

small bug in removeTargetClass

In:
removeTargetClass = function () {
this.classList.remove( sortable.targetClass );
};

The "this" is undefined. I guess it's a low priority bug though.

Doesn't work on components..

If I try to use this on component:

<component decorator="sortable"></component>
'The "intro", "outro" and "decorator" directives have no effect on components.'

..or on component template:

<div class="component" decorator="sortable"></div>
'The sortable decorator only works with elements that correspond to array members'

I think a component user-case is pretty common..

Would it be an option to give the array as a parameter:

<div decorator="sortable:array"></div>

Connected sortable lists?

Hi,

I've been using Ractive to rebuild an old AngularJS application and I've been absolutely in love with it. Up until right about now. In the previous app I used jQuery UI's -sortable- together with an Angular plugin to create connected sortable lists with proper two-way binding. With Ractive however, I can't seem to get it to work. This Ractive sortable decorator doesn't seem to support connected lists (am I wrong?) and simply including jQuery UI to manipulate the DOM means the entire app goes haywire. I've even tried creating an 'on sortable stop' method to restore the DOM to its earlier state and then passing the new list variable to Ractive, but to no avail.

Can the decorator support connected lists, or will it in the near future? Or are there other ways to implement this functionality? I would really love to keep using Ractive, but as the functionality is critical for the app, I might have to switch frameworks again...

Thanks in advance for any help :)

Sortable is sorting when any element is dragged over

The dragenterHandler checks whether targetArray and sourceArray are identical but sourceArray is not reset on drop. So after the sortable has been used the first time it will react to any dragenter.
I'll submit a pull request soon.

Does not work in ractive 0.7

Error message
Uncaught TypeError: sourceKeypath.lastIndexOf is not a functiondragstartHandler @ Sortable.js:72

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.