Forgot to add: IDidMount/did-mount only gets called after mounting.  If you
want to run code after later renders you can use IDidUpdate.
On 18 Sep 2014 09:16, "Daniel Kersten" <dkers...@gmail.com> wrote:

> In Om, a good place to put things that need render to have been called is
> in IDidMount. You can get the DOM node for your component with (om/get-node
> owner) or (om/get-node owner ref) if you want a sprcific node with a :ref
> attribute set.
> On 17 Sep 2014 22:06, "Rostislav Svoboda" <rostislav.svob...@gmail.com>
> wrote:
>
>> Concerning sortable tables, at the moment I do following (don't laugh):
>>
>> cp https://github.com/google/closure-library/blob/master/closure/goog/ui/
>> tablesorter.js resources/public/js/out/goog/ui/
>>
>> index.html:
>> <html>
>>     ...
>>     <body>
>>         <div id="dbase0"></div>
>>         <script src="http://fb.me/react-0.11.1.js";></script>
>>         <script src="js/out/goog/base.js" type="text/javascript
>> "></script>
>>         <script src="js/main.js" type="text/javascript"></script>
>>         <script type="text/javascript">goog.require("om_async
>> .client");</script>
>>         <script type="text/javascript">goog.require("goog.ui.TableSorter
>> ");</script>
>>         ...
>>     </body>
>> </html>
>>
>> client.cljs:
>> (defn table-sorter [elem-id]
>>   (let [el (gdom/getElement elem-id)]
>>     (if (nil? el)
>>       (println (str "ERROR: (gdom/getElement \"" elem-id "\") is nil"))
>>       (let [component (TableSorter.)
>>             alphaSort goog.ui.TableSorter.alphaSort
>>             numericSort goog.ui.TableSorter.numericSort
>>             reverseSort (goog.ui.TableSorter.createReverseSort
>> numericSort)]
>>         (.decorate component el)
>>         (.setSortFunction component 1 alphaSort)
>>         (.setSortFunction component 2 reverseSort)))))
>>
>> ...
>>
>> ;; pseudo code here:
>> (dom/table #js {:id table-id :onMouseOver (fn [] (table-sorter
>> table-id))}
>>    (dom/thead nil
>>       (apply dom/tr nil
>>      (map #(dom/th nil %) table-header-values)))
>>    (apply dom/tbody nil
>>       (apply dom/tr nil
>>      (map #(dom/td nil %) table-rows-values)))
>>
>>
>>
>> I.e. the table-sorter function makes my tables sortable but I have to
>> postpone it's execution until the dom/table get's rendered.
>> $(document).ready(..) and/or jayq.macros/ready don't work so I hack the
>> meat with :onMouseOver
>>
>> I started to fight with sortable tables just a few hours ago so some more
>> googling and/or your help might lead to better result.
>> Thx in advance
>>
>> Bost
>>
>>
>> On 17 September 2014 16:40, Daniel <doubleagen...@gmail.com> wrote:
>>
>>> I could have said that in a slightly less vitriolic way.  Apologies.
>>>
>>>
>>> On Tuesday, September 16, 2014 8:45:37 AM UTC-5, Sam Ritchie wrote:
>>>>
>>>> I fully agree that with more features, the library would be useful to a
>>>> larger range of folks :) Pull requests welcome, as always.
>>>>
>>>> I'm developing each component as needed as I convert paddleguru.com
>>>> over to Om. The input components and basic tables, panels, buttons and
>>>> navbars came first; the rest are on their way.
>>>>
>>>> My thought on open source is, document well and release early. There's
>>>> no reason to keep all the existing stuff closed because the tables module
>>>> isn't fully sexed out.
>>>>
>>>>   Daniel <doubleagen...@gmail.com>
>>>>  September 16, 2014 at 7:17 AM
>>>> Good work.  Although I hate to say it, It's of little use for most
>>>> projects without more out-of-the-box table options eg searchable, sortable,
>>>> paginated, never-ending.
>>>>
>>>> On Wednesday, August 27, 2014 2:05:27 PM UTC-5, Sam Ritchie wrote:
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Clojure" group.
>>>> To post to this group, send email to clojure@googlegroups.com
>>>> Note that posts from new members are moderated - please be patient with
>>>> your first post.
>>>> To unsubscribe from this group, send email to
>>>> clojure+unsubscr...@googlegroups.com
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/clojure?hl=en
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Clojure" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to clojure+unsubscr...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>   Sam Ritchie <sritchi...@gmail.com>
>>>>  August 27, 2014 at 1:05 PM
>>>>  This release adds a bunch of new active components - notably,
>>>> dropdown buttons, split dropdown buttons and a navbar. The navbar allowed
>>>> me to beef up the doc site with a proper navbar, more pages and client-side
>>>> javascript navigation using Secretary and Html5 pushState:
>>>>
>>>> http://om-bootstrap.herokuapp.com
>>>>
>>>> Code:
>>>>
>>>> https://github.com/racehub/om-bootstrap
>>>>
>>>> Leiningen:
>>>>
>>>> [racehub/om-bootstrap "0.2.6"]
>>>>
>>>>
>>>> RELEASE NOTES:
>>>>
>>>> - Upgraded Clojurescript dependency on the doc site to get around this
>>>> bug: http://dev.clojure.org/jira/browse/CLJS-839. Added a note.
>>>>
>>>> This hash code bug was causing `bs-class-set`'s internal lookup in
>>>> `class-map` to sporadically fail in Safari 7.0.x.
>>>>
>>>> >From https://github.com/racehub/om-bootstrap/pull/13:
>>>> - `om-bootstrap.util/clone-with-props` can now "clone" proper om
>>>> components by injecting extra attributes into the om cursor.
>>>> - `:on-select` handlers on top level nav elements now get called if
>>>> set, along with the current nav-item `:on-select` handlers
>>>>
>>>> ### New Components
>>>>
>>>> - `dropdown-mixin` (mixins.cljs)
>>>> - `menu-item`, `dropdown-menu`, `dropdown` (button.cljs)
>>>> - `split` (ie, SplitButton) (button.cljs)
>>>> - `navbar` (ie, SplitButton) (button.cljs)
>>>>
>>>>
>>>>
>>>> --
>>>> Sam Ritchie (@sritchie)
>>>> Paddleguru Co-Founder
>>>> 703.863.8561
>>>> www.paddleguru.com
>>>> Twitter <http://twitter.com/paddleguru> // Facebook
>>>> <http://facebook.com/paddleguru>
>>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clojure@googlegroups.com
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to