Fork me on GitHub
#reagent
<
2017-08-26
>
deadghost15:08:49

ehhh https://github.com/mpowaga/react-slider how do I call the getValue method on the component?

deadghost15:08:24

with :onChange

juhoteperi15:08:09

@deadghost (.getValue (r/current-component))

juhoteperi15:08:51

Though I'd think the current value is also the parameter on onChange function

deadghost15:08:54

oh yeah looks like it gets passed in as a parameter

coetry18:08:01

For some reason i’m able to pass in all of the style props except for the grid positioning props. I see in the Firefox dev tools that every inline prop except for those were passed

coetry18:08:06

(defn letter [l color bg-color grid-pos-vec]
  [:div {:style {:text-transform "uppercase"
                 :background-color bg-color
                 :color color
                 :height "90%"
                 :padding-top "20px"
                 :padding-left "20px"
                 :grid-column-start (int (nth grid-pos-vec 0))
                 :grid-column-end (int (nth grid-pos-vec 1))
                 :grid-row-start (int (nth grid-pos-vec 2))                
                 :grid-row-end (int (nth grid-pos-vec 3))}} 
   [:h1 l]])

coetry18:08:46

I get no compilation errors. When I manually add those props in dev tools, it works as expected

coetry21:08:34

any ideas? Literally every property works except those four (afaik)

coetry21:08:29

(defn letter [l color bg-color grid-pos-vec]
  [:div {:style {:text-transform "uppercase"
                 :background-color bg-color
                 :color color
                 :height "90%"
                 :padding-top "20px"
                 :padding-left "20px"
                 :grid-column (str (nth grid-pos-vec 0)
                                   " / "
                                   (nth grid-pos-vec 1))
                 :grid-row (str (nth grid-pos-vec 2)
                                   " / "
                                   (nth grid-pos-vec 3))
                 :border-radius 5}} 
   [:p l]])

coetry21:08:38

strangely the shorthand version does work

coetry21:08:51

is there anything against three word prop names?