mates-grid docs

mates-grid

Cell Rendering

Cells are text by default. Supply cellRenderer as a template function — (params) => html`…` — not a component. Use valueFormatter for display strings and cellClass / cellStyle for chrome.

Pills and custom templates

statusRenderer returns a mates html template. Amount shows both the formatted string and the raw number.

{
  field: "status",
  cellRenderer: ({ value }) => html`<span class="pill">${value}</span>`,
}