### Install vue-good-table using npm
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/index.html
Instructions to install the vue-good-table package using npm, saving it as a dependency in your project.
```Shell
npm install --save vue-good-table
```
--------------------------------
### Create a basic vue-good-table component example
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/index.html
A complete Vue.js component example demonstrating the basic usage of vue-good-table, including defining columns with various types and populating rows with sample data for display.
```Vue.js
```
--------------------------------
### Install Vue Good Table with npm
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/README.md
Installs the Vue Good Table package and its dependencies using the npm package manager. The `--save` flag ensures the dependency is added to the project's `package.json` file.
```bash
npm install --save vue-good-table
```
--------------------------------
### Basic Vue Good Table Component Usage Example
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/README.md
Demonstrates a basic implementation of the `vue-good-table` component in a Vue application. It defines columns with labels, fields, and data types (e.g., number, date, percentage), and provides sample row data to populate the table.
```vue
```
--------------------------------
### Configure vue-good-table as a Nuxt.js plugin
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/index.html
Guide on creating a Nuxt.js plugin file to import and register vue-good-table globally within a Nuxt application, ensuring its styles are also included for proper rendering.
```JavaScript
import Vue from 'vue'
import VueGoodTablePlugin from 'vue-good-table';
// import the styles
import 'vue-good-table/dist/vue-good-table.css'
Vue.use(VueGoodTablePlugin);
```
--------------------------------
### Create Vue Good Table Plugin for Nuxt.js
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/README.md
Defines a Nuxt.js plugin file (`vue-good-table.js`) that imports Vue and Vue Good Table, along with its styles, and registers the plugin globally. This setup is necessary for proper integration within a Nuxt.js project.
```javascript
import Vue from 'vue'
import VueGoodTablePlugin from 'vue-good-table';
// import the styles
import 'vue-good-table/dist/vue-good-table.css'
Vue.use(VueGoodTablePlugin);
```
--------------------------------
### Globally import and register vue-good-table plugin in Vue.js
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/index.html
Demonstrates how to import the vue-good-table plugin and its styles, then register it globally with Vue.js, making the component available throughout your application.
```JavaScript
import VueGoodTablePlugin from 'vue-good-table';
// import the styles
import 'vue-good-table/dist/vue-good-table.css'
Vue.use(VueGoodTablePlugin);
```
--------------------------------
### Install Vue-good-table via npm
Source: https://github.com/xaksis/vue-good-table/blob/master/README.md
This snippet demonstrates how to install the vue-good-table package using npm, saving it as a dependency in your project.
```bash
npm install --save vue-good-table
```
--------------------------------
### Basic Vue Good Table Component Usage with Search and Pagination
Source: https://github.com/xaksis/vue-good-table/blob/master/README.md
Demonstrates a basic setup of the `vue-good-table` component, including column definitions, row data, and enabling search and pagination features. This example shows how to integrate the table into a Vue.js template and script.
```html
```
```javascript
```
--------------------------------
### Globally Register Vue Good Table Plugin in Vue.js
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/README.md
Imports the Vue Good Table plugin and its associated CSS styles, then registers it globally with Vue using `Vue.use()`. This makes the component available throughout the entire Vue application.
```javascript
import VueGoodTablePlugin from 'vue-good-table';
// import the styles
import 'vue-good-table/dist/vue-good-table.css'
Vue.use(VueGoodTablePlugin);
```
--------------------------------
### Configure Nuxt.js to Load Vue Good Table Plugin
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/README.md
Adds the Vue Good Table plugin to the `plugins` array in `nuxt.config.js`. The `ssr: false` option ensures the plugin is only loaded on the client-side, which is typical for UI components that interact with the DOM.
```javascript
plugins: [
{ src: '~/plugins/vue-good-table', ssr: false }
]
```
--------------------------------
### Import vue-good-table into a specific Vue component
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/index.html
Shows how to import vue-good-table and its styles directly into a Vue component and register it within the component's 'components' option for local use.
```JavaScript
// import the styles
import 'vue-good-table/dist/vue-good-table.css'
import { VueGoodTable } from 'vue-good-table';
// add to component
components: {
VueGoodTable,
}
```
--------------------------------
### Basic Checkbox Table Implementation with Search in Vue Good Table
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/advanced/checkbox-table.html
This example provides a minimal setup for a checkbox table in `vue-good-table`, demonstrating how to enable row selection and search functionality simultaneously.
```Vue.js
```
--------------------------------
### Import Vue Good Table into a Vue Component
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/README.md
Imports the Vue Good Table component and its styles directly into a specific Vue component. The component is then registered locally within the `components` option, making it available only to that component.
```javascript
// import the styles
import 'vue-good-table/dist/vue-good-table.css'
import { VueGoodTable } from 'vue-good-table';
// add to component
components: {
VueGoodTable,
}
```
--------------------------------
### Basic Checkbox Table with Search in Vue Good Table
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/advanced/checkbox-table.md
This example shows a minimal setup for a vue-good-table with enabled row selection and search functionality, demonstrating the core components required for a basic interactive table.
```Vue
```
--------------------------------
### Configure Global Search Options for Vue-good-table
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/configuration/search-options.md
Demonstrates the initial setup of global search options for `vue-good-table`, including enabling search, setting trigger behavior, diacritic skipping, custom search function, placeholder text, and external query binding.
```html
```
--------------------------------
### Declare Vue Good Table Plugin in Nuxt.js Configuration
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/index.html
This configuration snippet demonstrates how to declare the `vue-good-table` plugin within your `nuxt.config.js` file. The `ssr: false` option indicates that the plugin should only be loaded on the client-side, which is often necessary for plugins that interact directly with the DOM or browser APIs.
```JavaScript
plugins: [
{ src: '~/plugins/vue-good-table', ssr: false }
]
```
--------------------------------
### Configure All Vue Good Table Pagination Options
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/configuration/pagination-options.md
This example demonstrates how to configure all available pagination options for the `vue-good-table` component, including enabling pagination, setting mode, per-page limits, position, dropdown options, current page, jump buttons, and custom labels.
```html
```
--------------------------------
### Implement Custom Global Search Function
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/configuration/search-options.md
Provides an example of how to define and use a custom search function (`myFunc`) for the global search. The function receives row, column, cell value, and search term as arguments.
```html
```
```javascript
// in js
methods: {
myFunc(row, col, cellValue, searchTerm){
return cellValue === 'my value';
},
}
```
--------------------------------
### Configure All Search Options in Vue Good Table
Source: https://github.com/xaksis/vue-good-table/blob/master/README.md
This example demonstrates how to configure all available search options for the `vue-good-table` component. It includes settings for enabling search, trigger events, custom search functions, placeholders, and external query binding.
```html
```
--------------------------------
### Import Vue-good-table into a Vue component
Source: https://github.com/xaksis/vue-good-table/blob/master/README.md
This snippet provides examples for importing and registering the VueGoodTable component locally within a Vue component, supporting both JavaScript and TypeScript syntax.
```javascript
import { VueGoodTable } from 'vue-good-table';
// add to component
components: {
VueGoodTable,
}
```
```typescript
// add to component
components: {
'vue-good-table': require('vue-good-table').VueGoodTable,
}
```
--------------------------------
### Enable Pagination for vue-good-table
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/configuration/pagination-options.html
A simple example demonstrating how to activate pagination for the `vue-good-table` component by setting the `enabled` property to `true` within `pagination-options`.
```Vue
```
--------------------------------
### Configure All Pagination Options in Vue Good Table
Source: https://github.com/xaksis/vue-good-table/blob/master/README.md
This example demonstrates how to configure all available pagination options for the `vue-good-table` component. It includes settings for enabling pagination, items per page, position, dropdown options, and custom labels for navigation.
```html
```
--------------------------------
### Configure All Pagination Options in vue-good-table
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/configuration/pagination-options.html
This example demonstrates how to set up all available pagination options for the `vue-good-table` component. It includes enabling pagination, choosing a display mode, defining items per page, setting the paginator position, customizing the per-page dropdown, and overriding default labels and functions.
```Vue
```
--------------------------------
### Example: Array of Strings for vue-good-table Filter Dropdown
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/configuration/column-filter-options.html
Shows how to define 'filterDropdownItems' using a simple array of strings, where each string becomes a selectable option in the filter dropdown.
```JavaScript
filterDropdownItems: ['Blue', 'Red', 'Yellow']
```
--------------------------------
### Configure All Global Search Options for vue-good-table
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/configuration/search-options.html
This example demonstrates a comprehensive configuration of global search options for the `vue-good-table` component. It shows how to enable search, set the trigger to 'enter', skip diacritics for performance, provide a custom search function (`mySearchFn`), set a custom placeholder, bind an external query (`searchQuery`), and handle the `on-search` event.
```Vue.js
```
--------------------------------
### Enable and Configure Multiple Column Sorting in vue-good-table
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/configuration/sort-options.html
Example demonstrating how to enable multiple column sorting and set an initial sort order for two columns (`name` ascending, `age` descending) in `vue-good-table`.
```Vue
```
--------------------------------
### Set Table Data Mode
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/configuration/README.md
Configures the table's data handling mode. Setting `mode="remote"` enables server-side processing for features like sorting and filtering, instead of client-side handling. Refer to the Server Side Workflow guide for detailed examples.
```APIDOC
mode
type: String
Set mode=`remote` to allow sorting/filtering etc to be powered by server side instead of client side.
```
```html
```
--------------------------------
### Configure Vue Good Table for Remote Mode
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/advanced/remote-workflow.html
This Vue.js template snippet demonstrates the basic setup for `vue-good-table` in 'remote' mode, showing how to enable pagination and bind the `totalRows` and `rows` properties to component data, which will be populated from a server.
```Vue.js
```
--------------------------------
### Importing Vue-Good-Table's Root Sass File
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/style-configuration/sass.html
This Sass snippet demonstrates how to import the primary stylesheet of Vue-Good-Table directly from its installed npm package, enabling developers to leverage or override the component's default styling.
```Sass
@import "../node_modules/vue-good-table/src/styles/style.scss";
```
--------------------------------
### Configure Vue-Good-Table for Basic Remote Mode
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/advanced/remote-workflow.md
This HTML snippet demonstrates the fundamental setup for enabling remote mode in `vue-good-table` by setting the `mode` prop to 'remote'. It also binds `totalRows` and `rows` to data properties, indicating that data will be managed externally by the server.
```html
```
--------------------------------
### Example: Array of Objects for vue-good-table Filter Dropdown
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/configuration/column-filter-options.html
Shows how to define 'filterDropdownItems' using an array of objects, where each object has 'value' and 'text' properties for more granular control over dropdown options.
```JavaScript
filterDropdownItems: [
{ value: 'n', text: 'Inactive' },
{ value: 'y', text: 'Active' },
{ value: 'c', text: 'Check' }
],
```
--------------------------------
### Configure HTML Rendering for Vue Good Table Column
Source: https://github.com/xaksis/vue-good-table/blob/master/README.md
Indicates whether a column requires HTML rendering. The preferred method for creating HTML columns is by using slots. The example shows how to set the `html` property to `true` for a column and provide HTML content in the corresponding row data.
```javascript
columns: [
{
label: 'Action',
field: 'btn',
html: true,
}
//...
],
rows: [
{
btn: '',
// ...
}
]
```
--------------------------------
### Disable 'All' Option in Per Page Dropdown
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/configuration/pagination-options.md
This example demonstrates how to disable the 'All' option in the 'per page' dropdown for `vue-good-table` pagination, restricting users to predefined page sizes.
```html
```
--------------------------------
### Configure Basic Sorting and Initial Single-Column Sort
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/configuration/sort-options.md
This snippet demonstrates the fundamental setup for enabling sorting and defining an initial single-column sort order within a `vue-good-table` component using the `sort-options` prop. It sets `enabled` to true and specifies a default sort by 'name' in ascending order.
```html
```
--------------------------------
### Handle Global Search Event in Vue Good Table
Source: https://github.com/xaksis/vue-good-table/blob/master/README.md
Event emitted when a global search is performed (if enabled). The `onSearch` method receives parameters including the search term and the count of matching rows. The example shows how to bind the event in HTML and implement the handler in JavaScript.
```html
```
```javascript
methods: {
onSearch(params) {
// params.searchTerm - term being searched for
// params.rowCount - number of rows that match search
}
}
```
--------------------------------
### Vue Good Table Pagination Enable/Disable 'All' Option
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/configuration/pagination-options.html
API documentation and example for the `dropdownAllowAll` option. This boolean property controls whether an 'All' option is included in the 'rows per page' dropdown, allowing users to display all rows on a single page.
```APIDOC
dropdownAllowAll:
type: Boolean
default: true
description: enables/disables 'All' in the per page dropdown.
```
```Vue
```
--------------------------------
### Implement Custom Column Filters in Vue-Good-Table
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/advanced/README.md
This section provides examples for creating custom column filters in vue-good-table. It shows how to use a `slot="column-filter"` to render a custom filter component and how to integrate it with the table's filtering logic, including `updateFilters` and `formatValue`.
```html
```
```javascript
columns: [
{
label: 'Name',
field: 'name'
},
{
label: 'Category',
field: 'category'
},
{
label: 'Statistics',
field: 'statistics',
filterOptions: {
customFilter: true
}
}
]
// in your methods
handleCustomFilter(value) {
// filtering logic here
}
```
```html
updateFilters(column, value)"/>
```
```javascript
{
label: 'Name',
field: 'name.displayName',
filterOptions: {
customFilter: true,
slotFilterField: 'name.id',
formatValue: function (value) {
return valueArray.join(',');
}
}
}
```
--------------------------------
### Add Custom Columns to Vue-Good-Table
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/advanced/README.md
This example shows how to integrate columns not present in the original row data into vue-good-table. It uses the `slot="table-row"` to render 'before' and 'after' content based on custom column fields, requiring corresponding column definitions.
```html
before
after
{{props.formattedRow[props.column.field]}}
```
```javascript
{
label: 'Before',
field: 'before'
},
{
label: 'After',
field: 'after'
}
```
--------------------------------
### Vue Good Table Pagination Customize Per Page Dropdown Options
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/configuration/pagination-options.html
API documentation and example for the `perPageDropdown` option. This array property allows you to customize the specific integer values presented in the 'rows per page' dropdown menu.
```APIDOC
perPageDropdown:
type: Array
default: [10,20,30,40,50]
description: Customize the dropdown options for the amount of items per page.
```
```Vue
```
--------------------------------
### Handle Row Mouse Enter Event in Vue Good Table
Source: https://github.com/xaksis/vue-good-table/blob/master/README.md
Event emitted when the mouse pointer enters a table row. The `onRowMouseover` method receives parameters including the row object and page index. The example shows how to bind the event in HTML and implement the handler in JavaScript.
```html
```
```javascript
methods: {
onRowMouseover(params) {
// params.row - row object
// params.pageIndex - index of this row on the current page.
}
}
```
--------------------------------
### Configure Column Filter Options in Vue Good Table
Source: https://github.com/xaksis/vue-good-table/blob/master/README.md
A collection of properties for configuring column-specific filters. This object allows enabling filters, setting placeholders, initial values, dropdown items, custom filter functions, and trigger events. The example demonstrates various `filterOptions` properties.
```javascript
columns: [
{
label: 'name',
field: 'user_name',
filterOptions: {
enabled: true, // enable filter for this column
placeholder: 'Filter This Thing', // placeholder for filter input
filterValue: 'Jane', // initial populated value for this filter
filterDropdownItems: [], // dropdown (with selected values) instead of text input
filterFn: this.columnFilterFn, //custom filter function that
trigger: 'enter', //only trigger on enter not on keyup
},
},
// ...
]
```
--------------------------------
### Formatted Multiselect Filter with vue-select and custom logic
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/advanced/README.md
This example shows how to use `vue-select` with a custom `formatValue` function to transform the array of selected objects into a comma-separated string of IDs, suitable for `vue-good-table`'s filter value. It includes both the HTML template and the corresponding JavaScript data and methods.
```html
updateFilters(column, valuesArray)"
/>
```
```javascript
// vue-select emits an array of any objects selected in the dropdown
// which is being converted to a string of ids to pass into the column filter value
data: {
optionList: [
{
name: 'Joan',
id: 1
},
{
name: 'Don',
id: 2
}
],
columns: [
{
label: 'name',
field: 'name',
filterOptions: {
enabled: true,
customFilter: true,
formatValue: this.formatFilterValue
}
}
]
},
methods: {
formatFilterValue(valuesArray) {
return valuesArray.map((value) => value.id).join(',');
}
}
```
--------------------------------
### Vue-good-table Search Options API Reference
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/configuration/search-options.md
Detailed API documentation for the `search-options` prop of the `vue-good-table` component, outlining available properties, their types, default values, and descriptions.
```APIDOC
search-options: Object
enabled: Boolean (default: false)
Allows a single search input for the whole table.
Warning: Enabling this option disables column filters.
trigger: String (default: '')
Allows you to specify if you want search to trigger on 'enter' event of the input. By default table searches on key-up.
skipDiacritics: boolean (default: false)
By default, search does a diacriticless comparison so you can search through accented characters. This however slows down the search to some extent. If your data doesn't have accented characters, you can skip this check and gain some performance.
searchFn: Function
Allows you to specify your own search function for the global search.
placeholder: String (default: 'Search Table')
Text for global search input place holder.
externalQuery: String
If you want to use your own input for searching the table, you can use this property.
```
--------------------------------
### Example: Custom Range Filter Function for vue-good-table
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/configuration/column-filter-options.html
Provides an example of a custom 'filterFn' that filters numerical data within a specified range around the 'filterString'. This function parses the filter string as an integer and checks if the data falls within +/- 5 of that value.
```JavaScript
filterFn: function(data, filterString) {
var x = parseInt(filterString)
return data >= x - 5 && data <= x + 5;
}
```
--------------------------------
### Enable Multi-Column Sorting and Set Initial Multi-Sort
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/configuration/sort-options.md
This snippet demonstrates how to allow users to sort by multiple columns using `multipleColumns: true`. It also shows how to set an initial sort order involving multiple columns by providing an array of sort objects to `initialSortBy`, where the order in the array determines primary and secondary sorts.
```html
```
--------------------------------
### Enable/Disable Sorting for vue-good-table
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/configuration/sort-options.html
Example showing how to explicitly enable sorting for the `vue-good-table` component using the `enabled` property within `sort-options`.
```Vue
```
--------------------------------
### Set Vue Good Table Pagination Position
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/configuration/pagination-options.md
This example demonstrates how to change the position of the pagination controls in `vue-good-table` to 'top'. By default, pagination is at the 'bottom'.
```html
```
--------------------------------
### API Reference for vue-good-table infoFn Parameters
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/configuration/pagination-options.html
Details the structure and properties of the `params` object passed to the `infoFn` callback in `vue-good-table`'s pagination options, including record indices, total counts, and current page information.
```APIDOC
infoFn Parameters:
firstRecordOnPage: index of the first record on the current page
lastRecordOnPage: index of the last record on the current page
totalRecords: total number of records
currentPage: current page
totalPage: total number of pages
```
--------------------------------
### Hide a Column in Vue Good Table
Source: https://github.com/xaksis/vue-good-table/blob/master/README.md
Allows hiding a specific column from the table display. The example shows how to set the `hidden` property to `true` for the 'user_name' column.
```javascript
columns: [
{
label: 'name',
field: 'user_name',
hidden: true,
},
// ...
]
```
--------------------------------
### Apply Base Styles to Vue-good-table
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/style-configuration/style-classes.md
Initializes all core styles for the table. This class is fundamental for `vue-good-table`'s default appearance.
```vue
```
--------------------------------
### Set Column Width in Vue Good Table
Source: https://github.com/xaksis/vue-good-table/blob/master/README.md
Provides a specific width value for a table column. The example demonstrates setting a fixed width of '50px' for the 'user_name' column.
```javascript
columns: [
{
label: 'name',
field: 'user_name',
width: '50px',
},
// ...
]
```
--------------------------------
### Disable Global Search for a Column in Vue Good Table
Source: https://github.com/xaksis/vue-good-table/blob/master/README.md
If set to `true`, this column will be ignored by the global search functionality. The example shows how to disable global search for the 'user_name' column.
```javascript
columns: [
{
label: 'name',
field: 'user_name',
globalSearchDisabled: true,
},
// ...
]
```
--------------------------------
### Define Table Columns
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/configuration/README.md
Array containing objects that describe table columns. Each column object can have configurable properties.
```APIDOC
columns
type: Array
Array containing objects that describe table columns. The column object itself can contain many configurable properties.
```
```javascript
[
{
label: 'Name',
field: 'name',
}
//...
]
```
--------------------------------
### Implement Vue-Good-Table Remote Mode Event Handling
Source: https://github.com/xaksis/vue-good-table/blob/master/vp-docs/guide/advanced/remote-workflow.md
This comprehensive set of code demonstrates how to handle user interactions in `vue-good-table`'s remote mode. It includes the HTML template for attaching event listeners, the Vue `data` properties to manage table state, and the `methods` to update parameters and fetch data from the server based on user actions.
```html
```
```javascript
data() {
return {
isLoading: false,
columns: [
//...
],
rows: [],
totalRecords: 0,
serverParams: {
columnFilters: {
},
sort: [
{
field: '',
type: ''
}
],
page: 1,
perPage: 10
}
};
},
```
```javascript
methods: {
updateParams(newProps) {
this.serverParams = Object.assign({}, this.serverParams, newProps);
},
onPageChange(params) {
this.updateParams({page: params.currentPage});
this.loadItems();
},
onPerPageChange(params) {
this.updateParams({perPage: params.currentPerPage});
this.loadItems();
},
onSortChange(params) {
this.updateParams({
sort: [{
type: params.sortType,
field: this.columns[params.columnIndex].field,
}],
});
this.loadItems();
},
onColumnFilter(params) {
this.updateParams(params);
this.loadItems();
}
// load items is what brings back the rows from server
loadItems() {
getFromServer(this.serverParams).then(response => {
this.totalRecords = response.totalRecords;
this.rows = response.rows;
});
}
}
```
--------------------------------
### Apply Base Styles to vue-good-table
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/style-configuration/style-classes.html
The `.vgt-table` class is the foundational style class for `vue-good-table`. It initializes all the core visual styles required for the table to render correctly. This class should always be included in the `styleClass` prop.
```Vue
```
--------------------------------
### Vue Good Table Pagination Rows Per Page Option
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/configuration/pagination-options.html
API documentation and example for the `perPage` option. This integer property determines the maximum number of rows to display on a single page.
```APIDOC
perPage:
type: Integer
default: 10
description: Number of rows to show per page.
```
```Vue
```
--------------------------------
### Apply Default Theme to vue-good-table
Source: https://github.com/xaksis/vue-good-table/blob/master/docs/guide/style-configuration/index.html
Demonstrates rendering the vue-good-table component using its default styling. No explicit 'theme' prop is required as 'default' is the implicit theme, providing a standard table appearance.
```Vue
```
--------------------------------
### Apply Custom Class to Table Cells in Vue Good Table
Source: https://github.com/xaksis/vue-good-table/blob/master/README.md
Provides custom CSS class(es) to the table cells (