{# table_rows.html — inline-editable row cells, row states, Tab navigation. Requires: dzTable Alpine controller (editing, selected, isEditing, startEdit, toggleRow) Row height: 36px dense. v0.62 CSS refactor: inline Tailwind → semantic .dz-tr-* classes (components/fragments.css). Row state matrix (.is-selected / .is-saving / .is-error) driven by `:class="{...}"` Alpine binds — one-token swaps instead of 4 different `bg-/border-/opacity-` Tailwind expressions per modifier. #} {% from 'macros/status_badge.html' import render_status_badge %} {% if table and table.rows %} {% set _row_label_col = namespace(key="id") %} {% for col in table.columns %}{% if col.type not in ["ref", "badge", "bool", "currency"] and _row_label_col.key == "id" %}{% set _row_label_col.key = col.key %}{% endif %}{% endfor %} {% for item in table.rows %} {% set _row_label = item[_row_label_col.key] | default(item.id) %} {% set _row_label = _row_label | ref_display if _row_label is mapping else _row_label %}