Cell-renderer helpers — walking-skeleton first cut (ticket agd-01ky0ed8adbf). Namespace layout and naming are provisional until the namespace-layout decision lands.
AG Grid detects a component class via candidate.prototype && 'getGui' in candidate.prototype, so every helper here returns the class wrapped in
(raw ...) — the converter's fn auto-wrapping would otherwise strip the
prototype and silently degrade the class to a function renderer.
Cell-renderer helpers — walking-skeleton first cut (ticket agd-01ky0ed8adbf). Namespace layout and naming are provisional until the namespace-layout decision lands. AG Grid detects a component class via `candidate.prototype && 'getGui' in candidate.prototype`, so every helper here returns the class wrapped in (raw ...) — the converter's fn auto-wrapping would otherwise strip the prototype and silently degrade the class to a function renderer.
(dom-renderer render-fn)High-level helper: (fn [params-bean] js/Node | string) -> cellRenderer class (raw). A string renders as a text node — never HTML. The render result lives inside a <span> container so refresh can swap content in place (returns true).
High-level helper: (fn [params-bean] js/Node | string) -> cellRenderer class (raw). A string renders as a text node — never HTML. The render result lives inside a <span> container so refresh can swap content in place (returns true).
(renderer {:keys [init get-gui refresh destroy]})Low-level helper: lifecycle map -> cellRenderer component class (raw).
Each grid-created instance gets a fresh state atom, passed to every
lifecycle fn in place of this:
{:init (fn [state params] ...) ; params is a lazy kebab bean :get-gui (fn [state] element) ; required :refresh (fn [state params] bool) ; optional; absent -> false (re-init) :destroy (fn [state] ...)} ; optional
Low-level helper: lifecycle map -> cellRenderer component class (raw).
Each grid-created instance gets a fresh state atom, passed to every
lifecycle fn in place of `this`:
{:init (fn [state params] ...) ; params is a lazy kebab bean
:get-gui (fn [state] element) ; required
:refresh (fn [state params] bool) ; optional; absent -> false (re-init)
:destroy (fn [state] ...)} ; optionalcljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |