AppTable
A robust, high-performance data table — search, sorting, pagination, row/bulk actions, inline-editable status cells, and styled Excel export. Filtering is fully decoupled: pass a filterFields schema and the table renders an AppFilterPanel, which owns all filtering logic.
Install: pnpm add-component AppTable
Basic usage
Search, sortable columns, client-side pagination, and column visibility toggling.
Decoupled filtering + export
The flagship pattern: an AppFilterPanel drives the table. The panel owns every filter type — text, select, multiselect, boolean, numberRange, dateRange — plus removable chips and Apply/Clear. Filtering commits on Apply (not per keystroke), and the toolbar's Export button downloads the filtered rows as a styled .xlsx. This is the shape a real 'team' or 'users' screen takes.
Table-managed filtering
Skip the manual wiring — pass filterFields directly to AppTable and it renders the panel and filters itself (all logic still lives in AppFilterPanel). Combined here with cross-page selection, bulk actions, row actions with confirm + overflow, an inline-editable status cell, a truncated bio column, and Excel export.
Styled Excel export
Set exportable to add a toolbar button that downloads the current (filtered + sorted) dataset as a styled .xlsx via xlsx-js-style — bold header band, zebra rows, auto-fit columns, RTL-aware. exportMappers turn coded values into human labels. Click Export to download.
Inline status editing
Click any status badge to change it in place. The 'Status' column is a boolean toggle (Yes/No confirm popover); the 'Employment' column is a multi-option select popover. Both call onChange(row, value) and update the row live — try it.
Loading state
Use the loading prop to show a beautiful skeleton state while fetching data.
Empty state
Customizable empty state when no records are found.
API
columns(TableColumn[]): Column definitions. Each column may set sortable, hideable, truncate, or editable (see below).data(any[]): The dataset to display.loading(boolean): Displays skeleton loading rows.searchable(boolean): Adds a search input to the toolbar.paginated(boolean): Enables client-side pagination.showColumnToggle(boolean): Allows users to show/hide specific columns.itemsPerPage(number): Number of rows to show per page (client-side).emptyMessage(string): Message shown when data is empty.loadingMessage(string): Message shown above the skeleton rows while loading (also announced to screen readers).ofLabel(string): Label between page number and total in pagination.rowKey(string | (row) => string | number): Unique key field (or resolver function) for each row.serverPaginated(boolean): Use server-side pagination mode.pageNumber(number): Current page (server-side mode).pageSize(number): Rows per page (server-side mode).totalCount(number): Total record count (server-side mode).totalPages(number): Total pages (server-side mode).columnsVisibilityKey(string): localStorage key for persisting column visibility.pageSizeOptions(number[]): Page size dropdown options.filterFields(FilterFieldRow[]): Filter schema. When set, the table renders an AppFilterPanel above itself and filters via the panel’s filterRows — no filtering logic lives in the table. Supports text, email, number, select, phone, date, datetime, multiselect, boolean, dateRange, numberRange.filters(FilterState): Filter state (v-model:filters). The panel’s live values.filterDefaults(FilterState): Baseline the panel’s Clear resets to and the badge/chips diff against.filterTitle(string): Label on the filter panel trigger.exportable(boolean): Shows a styled-Excel export button in the toolbar (xlsx-js-style). Exports the filtered & sorted dataset across all pages.exportFileName(string): File name (without extension) for the downloaded .xlsx.exportLabel(string): Label on the export button.exportMappers(Record<string, Record<string|number, string>>): Per-column value→label maps so coded fields (status ids, booleans) export as human-readable text.exportRtl(boolean): Force RTL sheet direction. Defaults to the document direction at export time.columns[].editable(EditableCellConfig): Renders the cell as a clickable status badge. type: 'boolean' opens a Yes/No confirm popover; type: 'select' opens a list of options. Selecting a value calls onChange(row, value).columns[].truncate(boolean): Truncates long cell text with a hover tooltip on desktop and a tap-to-expand modal on touch devices.actions(RowAction[]): Declarative row actions; entries past maxInlineActions collapse into an overflow popover. Supports confirm for destructive actions.maxInlineActions(number): How many row actions render inline before the rest collapse into the overflow menu.actionsLabel(string): Header label for the actions column.selectable(boolean): Enables row selection checkboxes and the bulk action bar.selected((string | number)[]): v-model:selected — selected row keys, controllable from the parent.selectionMode('page' | 'all'): 'all' allows selection to persist across pages and shows a breakdown/audit popover (on-page vs. total) in the bulk bar.bulkActions(BulkAction[]): Actions available when rows are selected, shown in the bulk action bar.