This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-17
Channels
- # announcements (4)
- # aws (17)
- # beginners (108)
- # calva (2)
- # clojure (164)
- # clojure-austin (1)
- # clojure-europe (3)
- # clojure-italy (1)
- # clojure-nl (17)
- # clojure-uk (98)
- # clojurescript (31)
- # code-reviews (1)
- # cursive (23)
- # data-science (1)
- # dirac (6)
- # emacs (21)
- # figwheel-main (1)
- # fulcro (53)
- # graphql (2)
- # hoplon (1)
- # lein-figwheel (1)
- # leiningen (2)
- # lumo (21)
- # off-topic (118)
- # onyx (4)
- # pathom (59)
- # pedestal (2)
- # planck (3)
- # reagent (47)
- # reitit (2)
- # shadow-cljs (258)
- # spacemacs (3)
- # sql (10)
- # tools-deps (37)
for some reason animation
option isn’t working. I was wondering if anyone else had this problem. I can see in web developer tools that transform
and transition
css props are being applied when dragging items, but they are not animated.
React:
<Sortable options={{animation: 150}}>
{[1, 2, 3].map(item => (
<li>{item}</li>
))}
</Sortable>
Reagent:
[:> Sortable
{:options {:animation 150}}
[:li "hello"]
[:li "world"]
[:li "hello some other world"]]
because if I load react-sortablejs using CDN and then if I use [:> js/Sortable]
, it works
@bravilogy if you make a minimal repro I'm happy to take a look at it
oh that would be amazing 🙂 thank you! I was actually just posting the issue in #shadow-cljs but I’ll create a repo first
@bravilogy it also works when using
(ns rubaxa.core
(:require ["sortablejs/Sortable.min.js" :as sortable]
[reagent.core :as reagent]))
yeah its closure. If I just take the Sortable.js
and run it through closure (without shadow-cljs) it breaks the same way
if I wanted to use this react component https://github.com/SortableJS/react-sortablejs which is just a react component that uses that sortablejs library
that will rewrite all requires to sortablejs
to the minified version. so also the internal require that react-sortablejs
has
:js-options {:resolve {"sortablejs" {:target :require
:require "sortablejs/Sortable.min.js"}}}
lets see if they maybe have a clue to whats happening before reporting to closure folks https://github.com/SortableJS/Sortable/issues/1492