(aria-multiselectable selectable)Return "true" for multi-select, nil otherwise (attribute should be removed).
Return "true" for multi-select, nil otherwise (attribute should be removed).
The attributes x-table writes on its rows.
The attributes x-table writes on its rows.
(holdable? value-format row-value)True when a list in value-format can hold the row value row-value. A comma-separated list
cannot hold a value with a comma or outer whitespace.
True when a list in `value-format` can hold the row value `row-value`. A comma-separated list cannot hold a value with a comma or outer whitespace.
(invalid-json-message value-raw)The warning for a value that is not a JSON array of strings.
The warning for a `value` that is not a JSON array of strings.
(next-selection selectable selection row-value)The row values selected after a click on the row with the value row-value. Single mode asks
for that row alone, or for no row when it is selected.
The row values selected after a click on the row with the value `row-value`. Single mode asks for that row alone, or for no row when it is selected.
(normalize {:keys [columns-raw caption-raw selectable-raw striped? bordered?
full-width? compact? row-count-raw value-raw
value-format-raw]})Produce a canonical view-model map from raw attribute inputs.
Input keys: :columns-raw string | nil :caption-raw string | nil :selectable-raw string | nil :striped? boolean :bordered? boolean :full-width? boolean :compact? boolean :row-count-raw string | nil :value-raw string | nil :value-format-raw string | nil
Output keys mirror the attribute semantics with parsed/normalised values.
Produce a canonical view-model map from raw attribute inputs. Input keys: :columns-raw string | nil :caption-raw string | nil :selectable-raw string | nil :striped? boolean :bordered? boolean :full-width? boolean :compact? boolean :row-count-raw string | nil :value-raw string | nil :value-format-raw string | nil Output keys mirror the attribute semantics with parsed/normalised values.
(parse-columns s)Parse columns attribute to a CSS grid-template-columns string.
A positive integer string (e.g. "4") becomes "repeat(4,minmax(0,1fr))"
— equal-width tracks that can shrink below their content's intrinsic
minimum. Plain 1fr keeps a min-content floor, so a wide/unbreakable
cell makes its column bulge past its share and the columns come out
uneven; minmax(0,1fr) is what authors actually mean by "N equal
columns". For per-column sizing, pass an explicit template string instead.
Any other non-empty string is returned as-is.
Nil or blank → nil (no explicit template).
Parse `columns` attribute to a CSS grid-template-columns string. A positive integer string (e.g. "4") becomes "repeat(4,minmax(0,1fr))" — equal-width tracks that can shrink below their content's intrinsic minimum. Plain `1fr` keeps a `min-content` floor, so a wide/unbreakable cell makes its column bulge past its share and the columns come out uneven; `minmax(0,1fr)` is what authors actually mean by "N equal columns". For per-column sizing, pass an explicit template string instead. Any other non-empty string is returned as-is. Nil or blank → nil (no explicit template).
(parse-row-count s)Parse row-count to a positive integer, or nil if absent/invalid.
Parse row-count to a positive integer, or nil if absent/invalid.
(parse-selectable s)Normalise selectable attribute. Unknown/nil → "none".
Normalise selectable attribute. Unknown/nil → "none".
(role-for-selectable selectable)Return ARIA role string. "none" → "table"; any selection mode → "grid".
Return ARIA role string. "none" → "table"; any selection mode → "grid".
(row-select-detail row-index selected? selectable value)Build event detail for x-table-row-select. value is the text of value that the click asks for.
Build event detail for x-table-row-select. `value` is the text of `value` that the click asks for.
(row-stripe index)Return "even" for every second row, and nil for the others. index counts from zero.
Return "even" for every second row, and nil for the others. `index` counts from zero.
(seed-selection selectable marked-values)The selection that the rows marked selected give, from their values in order. Single mode takes the first.
The selection that the rows marked selected give, from their values in order. Single mode takes the first.
(selection-text value-format selection)The text of value for the row values selection, as a list in value-format.
The text of `value` for the row values `selection`, as a list in `value-format`.
(sort-detail col-index direction previous-direction)Build event detail for x-table-sort.
Build event detail for x-table-sort.
(unholdable-message row-value)The warning for a click on a row whose value a comma-separated value cannot hold.
The warning for a click on a row whose value a comma-separated `value` cannot hold.
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 |