Upgrade from 2.x to 3.x
Keep the same npm package. Install 3.x in your project, then check the behavior changes below.
bash
pnpm add @vtable-guild/vtable-guild@3To stay on 2.x, keep your dependency on @2 and use the 2.x documentation.
bash
pnpm add @vtable-guild/vtable-guild@2Upgrading from stable 2.x
- Resetting a custom filter. Calling
clearFilters()now submits the reset value and requests that the popup close. UseclearFilters({ confirm: false, closeDropdown: false })if your reset button should update the draft and wait for confirmation. WithfilterResetToDefaultFilteredValue: true, the reset restoresdefaultFilteredValue. Column filtering - Clicks outside a filter popup. Popups detect outside clicks in the capture phase, so
@mousedown.stopon an external control can no longer keep the popup open. Move the control into the popup or manage popup state withfilterDropdownOpenandonFilterDropdownOpenChange. Column filtering - Selected row order.
rowSelection.onChangereturnsselectedRowsin the order of the correspondingselectedRowKeysand skips keys whose records are unavailable. Sort the records in your application if a bulk action depends on table order. To match keys to records, use the row key. Row selection - Boolean cell display. Default cells display booleans as
trueorfalse. UsecustomRenderon columns that should display an empty cell or an application-specific label. Cell display - Filter option types. The
ColumnTypepropertiesfiltersandonFilternow also accept booleans. UseArray.isArray(column.filters)before reading an explicit option list andtypeof column.onFilter === 'function'before calling a filter function directly. Column filtering
Upgrading from 2.9.0 alpha
If you adopted VTableQuery in an early alpha, check the query configuration.
- Replace
layout="form"withlayout-type="QueryFilter"or omit the mode. Thelayoutprop now sets the form direction. Uselayout-type="LightFilter"for chip-based popup filters. - Rename the column option
querytosearch. The defaultpreserve: truekeeps hidden and collapsed fields in request parameters. Set:preserve="false"on the component to omit them. - Use
defaultCollapsedor the controlledcollapsedsetting for collapse state, andcollapseRenderfor the toggle. LightFilter submission timing follows the control and popup confirmation behavior.
See Schema query for the complete options and examples.