Resolves an :el-id value into the id string rendered into the DOM.
Callers never build strings themselves. Components and the SDK both call
el-id, so a view and a test using the same value always agree:
:first-name -> "first-name" :app.person/first-name -> "app.person/first-name" [:person "Bla" "ble"] -> "person--bla--ble" [some-element-fn "Bla"] -> whatever (some-element-fn "Bla") resolves to "already-built" -> "already-built"
Suffixes are joined with "--" so scanned ids can be split back into a nested path.
Resolves an :el-id value into the id string rendered into the DOM. Callers never build strings themselves. Components and the SDK both call `el-id`, so a view and a test using the same value always agree: :first-name -> "first-name" :app.person/first-name -> "app.person/first-name" [:person "Bla" "ble"] -> "person--bla--ble" [some-element-fn "Bla"] -> whatever (some-element-fn "Bla") resolves to "already-built" -> "already-built" Suffixes are joined with "--" so scanned ids can be split back into a nested path.
(el-id value)(el-id base & suffixes)Resolve an el-id value (keyword, vector, fn vector or string) to its id.
With extra arguments, base is combined with each suffix: (el-id :row 1 :amount).
Resolve an el-id value (keyword, vector, fn vector or string) to its id. With extra arguments, `base` is combined with each suffix: (el-id :row 1 :amount).
(el-id-sel f & args)(sel f & args)Selector that matches an element by el-id regardless of whether the primitive exposed it as :id (inputs) or :data-testid (containers/buttons). Prefer this in tests so callers do not need to know the per-primitive attribute mapping.
Selector that matches an element by el-id regardless of whether the primitive exposed it as :id (inputs) or :data-testid (containers/buttons). Prefer this in tests so callers do not need to know the per-primitive attribute mapping.
(testid-prefix-sel f & args)(testid-sel f & args)cljdoc 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 |