Open Web Components
On this page

Table Info#

The action-tab bar above the table: row counts, refresh, and built-in tabs for export, mass edit (owc-table-mass-edit), and column settings (owc-table-settings). It is rendered automatically by owc-table when show-info is set; use it standalone to compose your own toolbar.

export const simpleTable = () => {
  return html`
    <owc-table-info
      .showInfo=${true}
      .actionTabs=${{
        calculateSums: {
          visible: true,
        },
      }}
      .dataFullSize=${200}
      .dataCurrentSize=${17}
      .columns=${columns}
      .getRenderOptions=${() => ({
        selectedData: [],
        processedData: personData,
        columns,
      })}
    ></owc-table-info>
  `;
};

Settings tab (owc-table-settings)#

The built-in settings tab renders an owc-table-settings dropdown ("Spalten") where users cycle each column's visibility (always → if filtered → never) and reorder columns via drag & drop. Changes fire a change event and are persisted twice: to localStorage and to the URL, keyed by storeNamePrefix (<prefix>-override-settings / ?<prefix>-overrides=). URL overrides win on load, except for columns the user overrode locally. The footer's Reset button clears both stores.

There is no define entry for it - like the mass edit it is registered as a scoped element inside owc-table-info and configured through the table's store-name-prefix.

Built-in action tabs#

owc-table-info owns the built-in action tabs. They are hidden by default and are enabled through actionTabs by key:

KeyEnables
calculateSumsSum rows for columns with showInCalculateSums: true.
exportCopy as Excel and download as CSV.
massEditEdit selected rows with owc-table-mass-edit.
settingsOpen column visibility/order settings with owc-table-settings.

When owc-table-info is rendered by owc-table, the table supplies the render context for these tabs automatically. When composing owc-table-info yourself, pass getRenderOptions with the same shape (selectedData, processedData, columns, and any formatters your tab uses). See the table docs for calculate sums, exporting, custom action tabs, and mass editing.

API#

Attributes & properties#

PropertyTypeDefaultDescription
tableOwcTable-The connected table (wired automatically by owc-table).
columnsColumn[]-Column config, forwarded to the mass-edit and settings tabs.
getRenderOptionsfunction() => ({})Supplies tab render context such as processedData, selectedData, and columns.
actionTabsobject-Adds or overrides tabs (see the table docs "Add your own action tab").
actionTabActivestring-The active tab key.
showInfobooleanfalseShows the row-count info line.
refreshButtonbooleanfalseShows a refresh button.
loadingbooleanfalseSpins the refresh button.
dataFullSize / dataCurrentSize / dataSelectedSizenumber0The counts shown in the info line.

Events#

EventDescription
refresh-button-clickedFired (bubbling, composed) when refresh is clicked.
action-tab-active-changedFired when the active tab changes.