Clojurians
#hoplon
<
2016-05-27
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

leontalbot02:05:22

What is wrong with this?

leontalbot02:05:25

(defmethod do! :selectize [elem _ opts]
  (.selectize (js/jQuery elem) (clj->js opts)))

(defelem select-field [{:keys [cell small] :as attrs} data]
  (div :selectize
       (select)
       {:options [(clj->js {"item" "1"})
                  (clj->js {"item" "2"})]
        :valueField "item"
        :labelField "item"}))

leontalbot02:05:14

it is supposed to be used this way (.selectize (js/jQuery (.getElementById js/document "#dropdown"))) but I don't want to target the element by id. I want smth more general....

alandipert02:05:49

it's a selectize wrapper from the old hoplon-contrib i made

alandipert02:05:34

it might need tweaking with new hoplon

alandipert02:05:40

but the approach i think is still what you want

alandipert02:05:34

with-let a select element, and in a with-init! initialize selectize on it

levitanong07:05:04

TIL: the ISet protocol only defines one function: disjoin.

alandipert12:05:40

interesting, i guess because icollection and ilookup do the other stuff

alandipert12:05:11

anyone messed with capsule? http://www.capsule.io/

dm312:05:08

I did a bit

dm312:05:12

it works

dm312:05:51

for our big project was much faster to build than uberjar (no need to unpack all the dependencies)

dm312:05:05

also convenient to pack native libs/agents/JVM parameters

alandipert12:05:36

yeah, i'm really attracted to the idea of it

alandipert12:05:55

finding with standalone jar deploys that a light container would be nice

alandipert12:05:07

but many of the things i ship aren't web apps so tomcat etc don't make sense

leontalbot12:05:55

Could we imagine a boot task to create a capsule?

alandipert13:05:41

seems easy? :tm:

leontalbot13:05:23

:slightly_smiling_face: