Skip to main content
Version: v1 (Current)

DataTable Configuration Schema

This reference describes JavaScript configuration consumed by the current Mod DataTable. It is not a JSON Schema validator. Use the component guide for loading modes, payload precedence, selection lifetime, persistence, and troubleshooting. Functions and Vue component references cannot be serialized as JSON configuration.

Properties​

These are component props, not top-level aliases for every table option. See the component guide for request, pagination, selection, column, and action contracts.

PropTypeDefaultPurpose
tableTitleString""Display title
auditsArraynullOptional audit data
headersArray, required[]Header definitions
optionsObject, required{}Table behavior configuration
paginatedItemsObjectnullServer paginator
listDataArray or nullnullStatic row array
createConfigObject, required{}Create UI definition
itemModelObject{}Additional item context
dataStoreObject{}Data model store; supply the expected methods for model-backed features
selectedArray[]Initial selection

inlineEdit, emptyText, default sorting, and draggable behavior belong under options, not to additional component props. The declarations above describe accepted inputs; they do not imply every combination of empty defaults supports every model-backed feature.

Options Object Details​

SettingsContract
idStable namespace for row/card model stores; make it unique where tables have overlapping row IDs.
searchRouteString destination or route object; an object with exact requestType: "get" or "post" selects internal HTTP mode when static rows are null/empty.
listKeyDirect response-property extraction for internal HTTP; also the parent-model array key for staged operations. This differs from FormCard’s top-level listKey.
extraPayloadObject merged last into the internal search payload, overriding earlier keys.
onFetchSuccessCalled with internal response data after assignment; not the Inertia visit success callback.
defaultItemsPerPage, perPageOptions, hidePaginationInitial page size, available size choices (text/value objects), and pagination visibility.
defaultSortBy, defaultSortDirectionSort fallback after restored/URL state; server must support the requested field.
visibleColumnsColumn selector configuration, including defaultHeaders and sectionLabel. Empty selection displays all headers.
draggableHeadersHeader reordering UI; not row reordering or backend persistence by itself.
selectable, allowSelectAll, hideSelectAllLabel, singleSelectSelection controls; select-all concerns visible rows.
maxSelectioncount controls row disabling; showSelectionCount and selectionCountClassList configure the count display. Not a universal enforced limit.
includeSelectedInDataModelBinds selection through the named _select header and dataStore.
edit, delete, bulkDelete, bulkAction, selectionActions, additionalActionsDistinct action contracts; see the action sections below rather than interchanging their properties.
createConfigA separate component prop, not an options property.
updateLegacy inline-update named route/params/key and optional card update callback. Separate from inlineEdit.
inlineEditAttendee-oriented InlineEditCell: enabled, optional store.canEditField, fieldDefinitions, onSaved.
filter, defaultFilters, inlineFilters, advancedSearchFilter UIs/state; backend field/operator support is separate.
stickyState.storeRestores/snapshots view state and can implement executeSearch; not a durable saved-search API by itself.
exportsArray of ordinary POST, modal, or custom-action export definitions.
draggable, reorder, dragTargetDataDraggable body, persistence configuration, and source/target metadata.
tableStyleKey, tableDefaultStyle, style, cardLayoutPersisted style namespace/default and InfoCard configuration. Card layout is required for card rendering.
expandableRow detail modal or mode: "drawer"; cards and resource-specific save behavior.
stickyHeader, tableMaxHeight, itemClass, emptyTextDisplay configuration; empty text also considers active search/filter state.
enableNavigation, navigationStore, entityTypeSends paginator metadata/search/sort and active project context to the navigation store.
excludeRowsExcludes rows whose IDs occur in the parent model array named by excludeRows.name; that model value must be an array.
onMounted, onUnmountedLifecycle hooks; mount receives { fetchData, updateTableRows }.

Search route object​

route can be a registered route name or function returning a destination. params normally holds route values; the projectPlugin form maps object values from parent-model paths and supplies the active project slug. Array descriptors use { name, key } for model lookup or a truthy { name, value } literal. requestType controls HTTP mode, and waitForFetchEvent suppresses its mount fetch. Do not infer authorization from client route availability.

Minimal option shapes​

These JavaScript fragments show object placement. Route names and parameters must be replaced with the actual feature’s registered routes; they are not additional platform APIs.

const options = {
id: 'feature-items',
perPageOptions: [{ text: '10', value: 10 }, { text: '25', value: 25 }],
defaultItemsPerPage: 10,
update: { route: 'your.items.update', key: 'item', params: {} },
tableDefaultStyle: 'card_view',
tableStyleKey: 'feature-items-style',
cardLayout: {
cols: 12, colsMd: 6, colsLg: 4,
headerImage: 'image_url',
fieldsList: [{ type: 'description', name: 'name' }],
},
defaultFilters: [{ field: 'status', operator: '=', value: 'active' }],
filter: {
cards: [{ type: 'fields_list', fieldsList: [] }],
},
}

The empty filter card only establishes the FilterDialog/FormCard nesting; it supplies no filter control or query by itself. Build its fields with the FormCard and field dispatch contracts and the actual backend filter representation. For a complete search UI, use a supported feature’s field/operator configuration and test the resulting payload rather than assuming that naming a column implements filtering.

Headers Array​

Property/typeConsumed behavior
key, title, sortable, alignData key, heading, sort interaction, alignment. Explicit sortable: false disables ordinary header sorting.
headerClassList, class, widthBranch-specific header/cell presentation; not a generic visibility policy.
format(value, item)Text formatting of nested value in the default/badge paths.
formatHtml(value, item)Trusted HTML rendered with v-html; sanitize untrusted values before returning them.
prepend, append, icon, iconOptions, iconStyleDefault-cell adornment; icon/style can use row functions where supported.
type: "boolean"Reads the direct row key as a truthy Boolean display.
type: "status_circle"Status styling from classList/styleDef; statusText(item) supplies tooltip text.
type: "translation"Uses translation location/key and optional prepend/append.
type: "image"Direct row key or url(item, column), optional sprite/icon branch, imageStyle, and caption fields.
type: "time_since", "duration"Direct-key relative-time or duration formatting.
type: "timestamp", "laravel-timestamp"Nested timestamp lookup; created_at/updated_at keys also enter the timestamp branch.
type: "badge"Nested value, optional condition, color/classes and formatter.
type: "badges"badges(item) returns badge definitions; URL callbacks belong to individual badges.
type: "tags"Direct-key array; transform(tag) first, else object textKey lookup, else raw tag; optional maxTags.
type: "external_link"Callable route(item), optional callable label, function/array classes.
type: "internal_link"Callable route, label, and classList; renders Inertia Link.
type: "export_button"Callable classList/label; passes row merged with options to the table export handler.
type: "download_button"Callable route/classList/label; initial GET expects JSON with signed url.
type: "markdown"Nested value passed to the platform Markdown formatter.
type: "progress_segments"segments(item) or nested array, plus colors.
cellComponent, cellPropsCustom component after built-in type branches; receives item/column/value, with no universal save listener.
inlineEditable, fieldSlug, fieldTypeAttendee InlineEditCell after custom component branch; also requires options.inlineEdit.enabled.
key: "update_action"Legacy FormField update control; field defines its input.
key: "_select"Selection slot; optional name/column bind selected IDs to a model field.
key: "actions"Row action controls; table moves this column last.

Tags Column Type​

Supply arrays even when empty. For { key: "roles", type: "tags", textKey: "name" }, row.roles contains objects whose name is displayed. A transform callback overrides textKey; nested textKey lookup applies inside each tag, not to the top-level roles key.

Delete Action Configuration​

options.delete accepts named route, params, identifier parameter key, optional source key_type, confirmation text/body/cards, messages, condition and UI visibility settings. Route functions receive the found row. A missing property selected by key_type falls back to row slug and then ID. options.bulkDelete has its own route and params; the row-delete modal masks bulk selection and destination. Missing/# destinations are refused before submission.

options.selectionActions uses unique slugs, named route/params, requestMethod, requestBody, transformBody, modal text/cards, allowDeleteAll, and optional customModalComponent. It is not the legacy bulkAction { ids } POST contract. Review the payload and callback limitations, especially the bulk callback’s potential double invocation and single-mode omission of requestBody/transformBody.

Expandable Forms in Data Tables​

expandable.cards contains FormCard definitions. The default table-row UI uses FormModal. mode: "drawer" uses the table-level drawer with title, subtitle, titleBadges, width, drawerSize, footerButtons, footerActions, and optional projectTags. Footer actions with a callable condition are filtered against the row; onClick(item, context) receives close/refresh/model context. Configuring buttons does not implement a backend update route.

Nested data tables follow the same FormCard list/HTTP contracts as outer tables. Give each table its own options.id; do not reuse example ID namespaces in unrelated feature instances.

Drawer footerButtons are passed to FormButtonGroup. Drawer footerActions use the callback contract above. FormModal’s own footer/update configuration belongs to that component and must be configured for the actual feature; these are not interchangeable button schemas. Use the FormField dispatch reference for button-group and form-modal fields rather than assuming every field option is a DataTable option.

Create configuration​

createConfig is a prop with create, cards/tabs, optional component, position and identifier. Type-specific creation adds dropdownCreate.options, dynamicFieldsFetcher or dynamicFieldsKey, dynamicFieldsMode, typeIdField, typeOptionForValue, and refetchFieldsOnTypeChange. Placeholder cards receive the chosen definition. staged keeps rows in the parent model until the parent saves. The lifecycle guide describes race handling and failure behavior.

Data Handling Options for DataTable​

Use one row owner: nonempty static list, internal HTTP paginator, or server Inertia paginator. Static sort/slice is not full client-side search/filtering. JSON and Inertia endpoints have different response contracts. Export modes and card-view actions likewise differ from row-view operations; configure and validate the specific branch you enable.

Data Store Naming Conflicts​

Row stores use update_<options.id-or-expandable>_<row.id>; card stores use update_<options.id-or-info_card>_<row.id>. Stable unique IDs prevent unintended model sharing when row IDs overlap. They provide no server tenant isolation. See store naming guidance.

Validation​

Use the component guide’s mounted static Vue integration example and acceptance table. Source verification covers the contracts documented here at platform commit 3b48eb675f7c8e3c4f0b87d0cd613fa7fb371093; selected mocked-browser tests cover pagination, selection, visible columns, confirmation/form-card payloads, create type lifecycle, and drawers. A strict docs build checks rendering, not real backend permissions, production requests, generated export files, or every child field. Validate each configured module against its actual endpoints before release.

Reproducing the documentation checks​

From the documentation repository, run node .github/scripts/run-datatable-doc-checks.mjs ../experience-portal with the platform Node dependencies installed. The retained fixtures and runner notes describe the platform mocks and temporary workspace. The review report records source scope, repairs and acceptance gaps. At the reviewed commit, nine suites/69 tests passed, including a mounted copy of the exact static Vue example. No live mutation or export delivery was tested.