PhoenixPaper.TableContainer (PhoenixPaper v0.1.0)

Copy Markdown View Source

A horizontally-scrolling wrapper for PhoenixPaper.Table (pp_table_container/1) — composes PhoenixPaper.Paper for the surface (background, elevation, rounded corners), the same pairing MUI's own docs show (<TableContainer component={Paper}>).

<.pp_table_container>
  <.pp_table>
    ...
  </.pp_table>
</.pp_table_container>

Also the ancestor a sticky_header table needs: position: sticky pins an element to the top of its nearest scrolling ancestor, and this is that ancestor (overflow-x-auto — vertical scrolling, if the table is tall enough to need it, has to come from a class you add yourself, e.g. class="max-h-96 overflow-y-auto", since a table wide enough to need horizontal scroll but not tall enough to need vertical scroll is the more common case, and forcing both isn't always wanted).

Summary

Functions

Renders a table container. See the module doc.

Functions

pp_table_container(assigns)

Renders a table container. See the module doc.

Attributes

  • paperize (:boolean) - Defaults to true.
  • elevation (:integer) - Defaults to 1.
  • shape (:atom) - corner radius token, see PhoenixPaper.Shape. Defaults to :lg. Must be one of :none, :xs, :sm, :md, :lg, :xl, or :full.
  • class (:any) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)