Skip to content

Guide to upgrade from 1.x to v2.0

xaksis edited this page Mar 4, 2018 · 8 revisions

Changes

Styles come separately

The styles are now separated from the js component. This means it needs to be imported separately. This also means that if you don't want to use vue-good-table's styles, just don't include it 😄

Nocturnal theme added

Nocturnal Theme to activate, use theme="nocturnal"

action-slot now renders on the control-bar next to the global-search

Properties deleted

Some properties were removed

Table Properties

  • title - title can easily be rendered outside the table. There's no good reason to have that as part of the table component especially since action-slot is now moved to the control-bar (next to global-search). Good Bye Title!

Column Properties

  • filterDropdown - If filterDropdownItems is populated and is an array, we know to use a dropdown instead of an input. This boolean was not necessary and therefore was removed. Good-Bye!

Property name changes

I changed several property names to 1. follow recognizable patterns 2. to align them better with what they do. Here's a list:

table properties

Old Name New Name
globalSearch searchEnabled
globalSearchFn searchFn
globalSearchPlaceholder searchPlaceholder

column properties

Old Name New Name
inputFormat dateInputFormat
outputFormat dateOutputFormat
filterable filterOptions.enabled
filterValue filterOptions.filterValue
filter filterOptions.filterFn
placeholder filterOptions.placeholder
filterOptions filterOptions.filterDropdownItems

Event name changes

Event names were also changed to make them more consistent

Old Name New Name
perPageChanged on-per-page-change
pageChanged on-page-change

New events added to support Remote Mode

  • on-row-click - event emitted on row click
  • on-search - event emitted on global search change
  • on-column-filter - event emitted on column filter change
  • on-sort-change - event emitted on sort change
Clone this wiki locally