Skip to content

Column options

QTableOptions manages the column-order, visibility, and pinning models without requiring a particular table adapter. The application applies the emitted models to its own table.

Open column-options popover

Column pin actions

Inputs and state

Prop/modelDefaultDescription
columnsrequiredColumnDefinition[], including column IDs, labels, and optional constraints.
v-model:column-orderrequiredOrdered IDs displayed by the control.
v-model:invisible-columnsrequiredIDs currently hidden.
v-model:column-pinningrequired{ left?: string[], right?: string[] }.
iconi-tabler-adjustmentsTrigger icon.
shortcutstrueEnables Shift + O.
textsExplicit text overrides, ahead of i18n and English defaults.
ui.contentExtra classes for the Nuxt UI popover content.

Only IDs present in column-order are shown. A column with enableHiding: false keeps a disabled visibility switch.

Popover actions

  • Reorder columns — drag a row onto another row. The component emits a reordered column-order array.
  • Show or hide a column — toggle the switch. The component adds or removes its ID from invisible-columns unless hiding is disabled.
  • Pin left or right — open the pin action and choose Left or Right. The ID is removed from the other side first, then added to the selected side.
  • Unpin — choose Unpin to remove the ID from both pinning arrays.
vue
<QTableOptions
  v-model:column-order="columnOrder"
  v-model:invisible-columns="invisibleColumns"
  v-model:column-pinning="columnPinning"
  :columns="columns"
/>

Slots

SlotUseful slot props
triggeropen, toggle
headercolumns
itemscolumns, move, toggleVisibility, pin
itemcolumn, index, visible, pin, toggleVisibility

The slots let an application replace the whole list or a row while retaining the component's immutable state updates.

Released under the MIT License.