Macaw.Builtin.Table (macaw v0.1.2)

Copy Markdown View Source

The built-in table (spec/05 §6.1), "macaw.table": an HTML <table> of whole rows, of kind :content, :pure.

  • parameters: caption (text, "Table"); identity (text, ""), the field naming each row, "" for rows that can't be selected; sort (text, "", bindable), the field rows are sorted by; order ("asc" or "desc", bindable);
  • declarations: one slot, rows; events "sort" and "select"; it writes selection as an identity; it observes :activate and :select; reading load :scan;
  • budget: the rows its declared height shows at 32 px a row, times four, at least 10;
  • markup: a capped or stale table draws its notice above its rows; a caption, a header of scoped <th> each holding a real button that emits sort, the sorted column's aria-sort, a row per delivered row sorted when sort names a column (nil last, ties in delivered order), and with an identity field a select button in each row's first cell and the row's id from its identity.