Table

The Table component is a powerful and flexible Vue.js component for displaying and managing tabular data. It supports sorting, filtering, grouping, pagination, inline editing, and extensive styling options.

Basic Usage

The Table component can be used with minimal configuration to display a dataset. At its core, it requires the data-source prop to provide the data to be rendered. By default, it automatically generates columns based on the keys of the objects in the data source.

1
John Doe
30
2
Jane Smith
25
3
Bob Johnson
45
<script setup lang="ts">
  const tableData = [
    { id: 1, name: 'John Doe', age: 30 },
    { id: 2, name: 'Jane Smith', age: 25 },
    { id: 3, name: 'Bob Johnson', age: 45 },
  ];
</script>
<template>
  <Table :data-source="tableData" />
</template>

In this example, the Table component renders a simple table using the tableData array. The data-source prop accepts an array of objects, where each object represents a row, and its keys (id, name, age) are used to automatically create columns. The component displays the data in a basic format with no additional configuration needed. This setup is ideal for quickly visualizing data without customization.

Column Configuration

The columns prop allows you to define the structure and behavior of each column in the Table component. It accepts an array of IColumn objects, where each object configures a single column.

dataField

The dataField property specifies the key in the data-source object that corresponds to this column's data. If not provided, the column may not display data unless inferred from the data source keys.

Name
Color
WeightGrams
Apple
Pink
850
Pineapple
Yellow
79
Pineapple
Yellow
1393
Apple
Yellow
355
Peach
Yellow
462
<template>
  <Table 
    :data-source="tableData" 
    :columns="[
      { dataField: 'name' }, 
      { dataField: 'color' }, 
      { dataField: 'weightGrams' }
    ]">
  </Table>
</template>

name

The name property provides an internal identifier for the column, useful for referencing in templates or logic.

<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{ dataField: 'name', name: 'userName' }];
</script>

type

The type property specifies the data type of the column. This property determines the structure and behavior of the column, including how it handles filtering and editing.

"string" or "number"

When the type is set to "string" or "number", the column is configured to handle textual or numerical data respectively.

Name
Star rating
Rooms available
Mountain Lodge
4
300
Skyline Hotel
4
232
Skyline Hotel
5
281
City Center Inn
4
165
Mountain Lodge
1
197
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe', age: 30 }];
const columns = [
  { dataField: 'name', type: 'string' },
  { dataField: 'age', type: 'number', isFilter: true }
];
</script>

"select"

When the type is set to "select", the column is configured to handle dropdown selections.

Name
Country
Star rating
City Center Inn
Thailand
2
Ocean View
USA
4
Skyline Hotel
Germany
4
Ocean View
USA
2
Ocean View
USA
3
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, country: 'USA' }];
const columns = [{
  dataField: 'country',
  type: 'select',
  isFilter: true
}];
</script>

"date"

When the type is set to "date", the column is configured to handle date values.

Name
Created At
Updated At
Start Date
End Date
Festival
03.12.2024
01.01.2026
27.05.2023
13.02.2023
Festival
14.11.2023
29.01.2022
26.02.2023
04.08.2023
Exhibition
12.02.2026
18.02.2024
08.01.2023
24.01.2023
Conference
03.02.2023
13.07.2023
11.01.2023
12.03.2023
Sports Event
16.09.2025
19.06.2023
07.11.2023
21.07.2023
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, birthdate: '1990-01-01' }];
const columns = [{
  dataField: 'birthdate',
  type: 'date',
  isFilter: true
}];
</script>

caption

The caption property customizes the text displayed in the column header for better readability or localization. If not provided, it defaults to the capitalized dataField.

Name
Color
Weight (grams)
Kiwi
Red
879
Strawberry
Orange
481
Grapes
Yellow
1480
Peach
Purple
968
Orange
Red
325
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{ dataField: 'name', caption: 'Full Name' }];
</script>

visible

The visible property controls whether the column is displayed, allowing you to hide or show the column without removing it from the configuration.

Visible
Name
Color
Mango
Yellow
Kiwi
Pink
Strawberry
Pink
Kiwi
Green
Mango
Green
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{ dataField: 'id', visible: false }, { dataField: 'name' }];
</script>

isFilter

The isFilter property enables filtering for the column, allowing users to filter data in this column.

Name
Color
Weight (grams)
Strawberry
Red
1796
Strawberry
Red
629
Grapes
Purple
1527
Watermelon
Pink
1784
Orange
Green
835
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{ dataField: 'name', isFilter: true }];
</script>

isSort

The isSort property enables sorting for the column, allowing users to sort data by this column.

Name
Color
Weight (grams)
Apple
Green
1499
Orange
Yellow
1501
Orange
Pink
104
Banana
Orange
476
Grapes
Yellow
1816
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{ dataField: 'name', isSort: true }];
</script>

isResized

The isResized property enables manual resizing of the column by dragging, allowing users to adjust column width interactively.

Name
Color
Weight (grams)
Watermelon
Purple
314
Kiwi
Purple
270
Peach
Pink
214
Mango
Orange
1282
Mango
Pink
71
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{ dataField: 'name', isResized: true }];
</script>

width

The width property sets the initial width of the column in pixels, defining a fixed width for consistent layout.

Name
Color
Weight (grams)
Peach
Purple
1.61
Orange
Orange
3.29
Watermelon
Red
0.92
Watermelon
Pink
9.44
Strawberry
Green
0.61
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{ dataField: 'name', width: 200 }];
</script>

minWidth

The minWidth property sets the minimum width of the column in pixels, ensuring the column doesn't shrink below a certain size, useful for resizing.

Name
Color
Weight (grams)
Orange
Red
3.48
Orange
Yellow
1.92
Watermelon
Green
9.52
Mango
Red
1.80
Strawberry
Orange
5.40
<template>
  <Table :data-source="tableData" :columns="columns" is-resized />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{ dataField: 'name', minWidth: 100 }];
</script>

maxWidth

The maxWidth property sets the maximum width of the column in pixels, limiting how wide the column can grow during resizing.

Name
Color
Weight (grams)
Banana
Pink
1.73
Grapes
Red
9.82
Grapes
Pink
7.07
Banana
Red
0.46
Peach
Purple
2.08
<template>
  <Table :data-source="tableData" :columns="columns" is-resized />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{ dataField: 'name', maxWidth: 300 }];
</script>

defaultFilter

The defaultFilter property sets an initial filter value for the column, pre-applying a filter when the table loads.

Model
Color
Price (USD)
A4
Green
42575
Civic
Red
64641
Camry
Blue
11512
X5
Red
66251
Mustang
Red
84365
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }, { id: 2, name: 'Jane Smith' }];
const columns = [{ dataField: 'name', isFilter: true, defaultFilter: 'John' }];
</script>

defaultSort

The defaultSort property sets the initial sort order for the column, pre-sorting the table by this column on load.

Model
Color
Price (USD)
Civic
Blue
9218
Mustang
Black
78323
Mustang
Silver
83004
Mustang
Black
32323
Mustang
Blue
79526
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John' }, { id: 2, name: 'Jane' }];
const columns = [{ dataField: 'name', isSort: true, defaultSort: 'asc' }];
</script>

mask

The mask property applies an input mask to the column's values for display or editing, formatting values (e.g., phone numbers, prices) consistently.

Model
Mileage (km)
Price (USD)
EV6
124 672
22 709
Civic
164 008
99 199
EV6
118 193
38 160
EV6
119 959
90 156
EV6
199 731
97 453
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, price: 1234.56 }];
const columns = [{ dataField: 'price', mask: 'price' }];
</script>

cellTemplate

The cellTemplate property specifies a slot name for custom rendering of cell content, allowing custom HTML or components for cell display.

Name
Country
Recommended
Star rating
Grand Palace
Canada
yes
Grand Palace
Germany
no
Mountain Lodge
Japan
yes
City Center Inn
Germany
yes
Mountain Lodge
Italy
no
<template>
  <Table :data-source="tableData" :columns="columns">
    <template #customName="{ value }">
      <strong>{{ value }}</strong>
    </template>
  </Table>
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{ dataField: 'name', cellTemplate: 'customName' }];
</script>

setCellValue

The setCellValue property allows you to define a function to customize how cell values are formatted or computed, overriding default value rendering for complex logic.

Model
Year
Mileage (km)
Price (USD)
EV6
2006 year
105656 km
$ 99371
EV6
2011 year
92443 km
$ 5755
Corolla
2025 year
187413 km
$ 81309
Model S
2011 year
99241 km
$ 20524
Civic
2000 year
92703 km
$ 49314
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, age: 30 }];
const columns = [{
  dataField: 'age',
  setCellValue: (column, value) => `${value} years`
}];
</script>

paramsFilter

The paramsFilter property allows you to provide partial options for filtering based on the data type specified in the type property. Depending on the type, you can customize the filter's behavior and appearance using the appropriate properties.

  • For "string" or "number" types: Use options specific to input fields.
  • For "select" type: Use options specific to select fields.
  • For "date" type: Use options specific to date fields.

Refer to the relevant documentation for more details:

Input Field Properties

For filtering options when using input fields ("string" or "number" types), explore the Input Field properties.

Select Field Properties

For filtering options when using select fields ("select" type), explore the Select Field properties.

Date Field Properties

For filtering options when using date fields ("date" type), explore the Date Field properties.

class

The class property allows you to apply custom CSS classes for various parts of the column, including the header, filter, and cell content.

Column Class Properties

Explore the various properties available for customizing the CSS classes of table columns, including header cells, filter inputs, and data cells. Dive into each property to see how you can style different parts of the column effectively.

Working with Data

Configure table functionality such as toolbar, sorting, filtering, search, and grouping for efficient data management.

Toolbar Table

The toolbar property configures the toolbar for the table. It can be enabled/disabled or customized using an object with specific options.

Name table
Name
Color
Weight (grams)
Kiwi
Pink
823
Kiwi
Purple
511
Orange
Pink
1046
Peach
Red
501
Mango
Orange
1509
<Table
    :data-source="tableData"
    :toolbar="{ visible: true }">
</Table>
  • visible: Determines whether the toolbar is displayed.
  • search: Enables the search input in the toolbar.

By setting toolbar to true, the toolbar is enabled with default settings. Providing an object allows for detailed customization.

Sorting

The sort property enables and configures sorting for the table. You can activate it with default behavior or customize its appearance and functionality.

Name
Color
Weight (grams)
Orange
Pink
564
Pineapple
Purple
1763
Mango
Purple
1868
Watermelon
Green
552
Mango
Orange
326
<Table
    :data-source="tableData"
    :sort="{ 
        visible: true, 
        icon: 'Bars' 
    }">
</Table>
  • visible: Toggles the visibility of the sorting feature.
  • icon: Specifies the sorting icon style ("Bars" or "Arrow").

Set sort to true for default sorting or provide an object for more control.

Filtering

The filter property enables row filtering in the table. It can be toggled or configured with advanced options.

Find...
Name
Color
Weight (grams)
Peach
Red
1212
Banana
Yellow
609
Banana
Red
1309
Grapes
Pink
1602
Banana
Green
391
<Table 
    :data-source="tableData" 
    :filter="{ 
        visible: true, 
        noFilter: 'No filters applied', 
        isClearAllFilter: true 
    }">
</Table>
  • visible: Toggles the filtering feature.
  • noFilter: Message displayed when no filters are applied.
  • isClearAllFilter: Enables a "Clear All Filters" option.

Setting filter to true activates basic filtering, while providing an object allows for advanced configurations.

The search property enables global search functionality across the table data.

Find...
Name
Color
Weight (grams)
Grapes
Orange
865
Watermelon
Green
1659
Pineapple
Red
892
Mango
Pink
1111
Watermelon
Red
1696
<Table 
    :data-source="tableData"
    :search="true">
</Table>

Set search to true to allow users to search through the entire table content.

Grouping

The grouping property enables data grouping in the table. You can specify the grouping field or provide a configuration object.

Name
Color
Weight (grams)
Purple
Strawberry
Purple
538
Orange
Purple
54
Apple
Purple
188
Pineapple
Purple
192
Kiwi
Purple
623
<Table 
    :data-source="tableData" 
    :grouping="{ visible: true, groupField: 'category' }">
</Table>
  • visible: Toggles the grouping feature.
  • groupField: Specifies the field used for grouping.

Setting grouping to a field name (e.g., "category") groups rows by that field. Using an object provides further customization.

Count visible rows

The countVisibleRows property specifies the number of rows visible in the table. This is useful for limiting the number of rows displayed at once.

5
Visible rows
Kiwi
Purple
113
false
USA
3.35
Kiwi
Yellow
1171
false
USA
0.20
Banana
Orange
1762
false
Mexico
4.09
Kiwi
Red
709
false
USA
8.69
Orange
Red
125
false
Brazil
2.33
<Table 
    :data-source="tableData" 
    :countVisibleRows="10">
</Table>

Set countVisibleRows to the desired number to control how many rows are visible at a time.

Resized columns

The resizedColumns property enables or disables column resizing in the table. When enabled, users can adjust the width of columns by dragging them.

Name
Color
Weight (grams)
Orange
Yellow
462
Watermelon
Green
1355
Pineapple
Purple
1918
Pineapple
Orange
1328
Grapes
Pink
1013
<Table 
    :data-source="tableData" 
    :resizedColumns="true">
</Table>

Set resizedColumns to true to allow column resizing.

countDataOnLoading

The countDataOnLoading property specifies the threshold at which the data loading indicator is triggered. This is particularly useful for improving the user experience during operations like search or filtering when working with large datasets.

Predefined values include 100, 1000, and 10000.

Find...
Name
Color
Weight (grams)
Grapes
Red
789
Orange
Orange
1133
Apple
Pink
972
Orange
Green
928
Banana
Purple
621
<Table
    :search="true"
    :data-source="tableData" 
    :countDataOnLoading="1000">
</Table>

Set countDataOnLoading to define the number of rows at which the loading indicator should appear. For example, during search or filtering, if the dataset exceeds this threshold, a loading state will be shown to enhance the user experience.

Summary

The summary property allows you to define and display summary rows in the table. This feature enables you to perform calculations (e.g., sum, min, max) on specified fields and customize how the results are displayed.

dataField

The dataField property specifies the data field for which the summary is calculated.

Mango
Yellow
741
Banana
Pink
678
Apple
Pink
1741
Orange
Purple
278
Grapes
Yellow
1558
Кол. 5
Кол. 5
Кол. 5
<Table 
    :data-source="tableData" 
    :summary="{ dataField: 'price' }">
</Table>

By setting dataField, you define the column that will be used for summary calculations.

name

The name property provides a custom name for the summary. This is helpful when displaying multiple summaries.

<Table
    :data-source="tableData"
    :summary="{ 
        dataField: 'price', 
        name: 'totalPrice' 
    }">
</Table>

Set name to give a meaningful label to your summary.

dataType

The dataType property specifies the data type for the summary. It ensures that the summary values are formatted correctly based on their type. The available options are:

  • "string": For textual data.
  • "number": For numerical data.
  • "select": For dropdown or selection-based data.
  • "date": For date-based data.
<Table
    :data-source="tableData"
    :summary="{ 
        dataField: 'price',  
        dataType: 'number' 
    }">
</Table>

Set dataType to match the type of data in the specified dataField. For instance, use "number" for numeric values or "date" for date-based fields.

type

The type property specifies the type of calculation performed for the summary. The available options are:

  • "sum": Calculates the total of all values.
  • "min": Finds the minimum value.
  • "max": Finds the maximum value.
  • "avg": Calculates the average of all values.
  • "count": Counts the number of rows.
Name
Total Users
Total Revenue
Active Users
New Users Today
Yearly Overview
86492
563553
39740
899
Monthly Report
85736
264003
37591
356
Daily Statistics
30756
577204
22989
606
Monthly Report
70279
835499
26071
279
Quarterly Analysis
42933
541208
4945
523
Count: 5
Avg: 63239
Min: 264003
Max: 39740
Sum: 2663
<Table 
    :data-source="tableData" 
    :summary="{ 
        dataField: 'price',
        dataType: 'number',
        type: 'sum' 
    }">
</Table>

Use type to configure the calculation logic for the summary.

displayFormat

The displayFormat property allows you to specify a custom format for displaying the summary result. You can use placeholders such as {0} to represent the calculated value.

Predefined formats include:

  • "Sum: {0}" : Calculates the total of all values.
  • "Min: {0}" : Finds the minimum value.
  • "Max: {0}" : Finds the maximum value.
  • "Avg: {0}" : Calculates the average of all values.
  • "Count: {0}": Counts the number of rows.
Name
Total Users
Total Revenue
Active Users
New Users Today
Weekly Summary
29843
296436
45437
554
Monthly Report
85868
663538
5106
633
Quarterly Analysis
42340
244791
41588
25
Monthly Report
46031
578385
45476
577
Yearly Overview
85574
964631
811
273
Name: 5 (count)
Total Users: 57931 (avg)
Total Revenue: 244791 (min)
Active Users: 45476 (max)
New Users Today: 2062 (sum)
<Table
    :data-source="tableData"
    :summary="{ 
        dataField: 'price', 
        type: 'sum', 
        displayFormat: 'Total: {0}' 
    }">
</Table>

Use displayFormat to customize how the summary result appears in the table.

customizeText

The customizeText property provides a function for dynamically customizing the summary text. This function receives the summary configuration and the calculated result as parameters and returns the formatted text.

<Table 
  :data-source="tableData" 
  :summary="{ 
    dataField: 'price', 
    type: 'sum', 
    customizeText: (summary, result) => `Total: ${result}` 
  }">
</Table>

Use customizeText for advanced text formatting based on the calculated summary value.

Pagination

The pagination property allows you to configure how table data is split into pages and how pagination controls are displayed.

visible

The visible property determines whether the pagination controls are displayed. The pagination property itself can be used in two ways:

  1. Boolean Shortcut: If set to true, pagination is enabled with default settings.
  2. Detailed Configuration: By providing an object, you can customize the pagination behavior.
Visible
Kiwi
Green
66
true
USA
6.49
Orange
Orange
1319
false
Thailand
6.24
Orange
Orange
1677
false
Mexico
9.97
Strawberry
Pink
990
false
USA
2.14
Mango
Yellow
647
true
Spain
2.73
1/100
<Table :data-source="tableData" pagination></Table>

This enables pagination with the default configuration.

Visible
Mango
Green
189
false
Spain
2.79
Pineapple
Red
1081
false
China
4.14
Apple
Pink
759
false
India
8.30
Pineapple
Yellow
1626
false
Thailand
3.20
Pineapple
Pink
270
true
China
4.69
1/100
<Table
    :data-source="tableData"
    :pagination="{ visible: true }">
</Table>

By using an object, you can explicitly configure pagination options such as visibility, page size, and more.

Setting visible to true ensures that pagination controls are displayed, while false hides them.

mode

The mode property specifies the styling mode of the pagination controls. Available options are:

  • "filled": Default filled style.
  • "outlined": Outlined style.
  • "underlined": Underlined style.
Mode
Strawberry
Green
1974
false
China
3.87
Strawberry
Green
891
true
China
7.79
Grapes
Orange
140
true
China
4.83
Kiwi
Green
1369
false
Thailand
2.04
Orange
Red
1075
true
Mexico
2.74
1/100
<Table
    :data-source="tableData"
    :pagination="{ 
        visible: true, 
        mode: 'outlined' 
    }">
</Table>

Set mode to customize the appearance of pagination controls.

startPage

The startPage property sets the initial page to display when the table is rendered.

Pineapple
Pink
1211
false
Brazil
1.08
Mango
Orange
1574
false
Brazil
0.06
Mango
Yellow
1929
false
Mexico
5.50
Apple
Green
1847
false
India
9.53
Pineapple
Green
1431
false
USA
6.30
1/100
<Table
    :data-source="tableData"
    :pagination="{ 
        visible: true, 
        startPage: 2 
    }">
</Table>

Use startPage to set the default page number.

sizePage

The sizePage property determines the number of items displayed per page. Predefined values include 5, 15, 20, 50, 100, and 150.

Size Page
Pineapple
Red
144
true
China
5.83
Grapes
Orange
1391
true
China
3.90
Banana
Green
389
false
China
6.70
Mango
Red
916
false
Spain
2.41
Banana
Orange
258
true
Brazil
8.48
1/25
<Table
    :data-source="tableData"
    :pagination="{ 
        visible: true, 
        sizePage: 20 
    }">
</Table>

Set sizePage to control the number of rows displayed per page.

sizesSelector

The sizesSelector property defines the available page size options that users can select.

Apple
Yellow
406
false
Mexico
3.13
Apple
Pink
500
false
India
2.65
Pineapple
Purple
105
true
Brazil
0.56
Kiwi
Orange
439
false
Spain
4.78
Pineapple
Yellow
1237
false
Spain
8.21
1/50
<Table
    :data-source="tableData"
    :pagination="{ 
        visible: true, 
        sizesSelector: [10, 25, 50] 
    }">
</Table>

Set sizesSelector to provide a custom list of page size options.

visibleNumberPages

The visibleNumberPages property specifies how many page numbers are displayed in the pagination control. The allowed values are 5, 6, 7, 8, 9, 10, or 11.

Strawberry
Green
457
false
USA
8.81
Pineapple
Orange
1372
false
China
2.77
Grapes
Orange
306
false
Thailand
9.39
Orange
Pink
1854
true
USA
8.78
Banana
Yellow
967
false
Thailand
3.36
1/100
<Table
    :data-source="tableData"
    :pagination="{ 
        visible: true, 
        visibleNumberPages: 7 
    }">
</Table>

Set visibleNumberPages to control the number of visible page buttons.

isInfoText

The isInfoText property enables informational text about the pagination state, such as "Page 1 of 5."

Apple
Purple
1916
false
Thailand
8.99
Peach
Pink
261
false
China
4.54
Apple
Pink
1824
true
USA
6.32
Banana
Yellow
316
true
China
2.36
Strawberry
Yellow
858
false
India
0.41
1/100
<Table
    :data-source="tableData"
    :pagination="{ 
        visible: true, 
        isInfoText: true 
    }">
</Table>

Set isInfoText to true to display informative pagination text.

isPageSizeSelector

The isPageSizeSelector property enables a dropdown for selecting the page size.

Pineapple
Pink
1993
true
Mexico
6.97
Kiwi
Purple
1616
true
Brazil
6.17
Mango
Yellow
327
false
USA
5.27
Orange
Yellow
1969
true
Brazil
2.71
Banana
Orange
832
true
India
2.90
1/100
<Table
    :data-source="tableData"
    :pagination="{ 
        visible: true, 
        isPageSizeSelector: true 
    }">
</Table>

Set isPageSizeSelector to true to allow users to select the number of rows per page.

isHiddenNavigationButtons

The isHiddenNavigationButtons property hides the pagination navigation buttons (e.g., "Next" and "Previous") when set to true.

Mango
Pink
812
true
India
6.56
Watermelon
Orange
1080
false
USA
9.89
Peach
Red
1207
false
Brazil
0.58
Orange
Pink
890
false
India
6.66
Peach
Purple
478
true
Thailand
4.74
1/100
<Table
    :data-source="tableData"
    :pagination="{ 
        visible: true, 
        isHiddenNavigationButtons: true 
    }">
</Table>

Set isHiddenNavigationButtons to true to hide navigation buttons.

class

The class property allows you to apply custom CSS classes to the pagination controls for styling.

Grapes
Green
1701
true
USA
9.73
Pineapple
Orange
906
true
China
2.87
Peach
Purple
1202
true
India
9.10
Kiwi
Pink
1304
true
Thailand
3.62
Mango
Yellow
1845
true
Brazil
6.08
1/100
<Table
    :data-source="tableData"
    :pagination="{ 
        visible: true, 
        class: 'custom-pagination-class' 
    }">
</Table>

Set class to style the pagination controls with your custom CSS classes.

Slots

Slots are customizable sections of the table that allow you to inject your own content. The table provides predefined slots such as toolbar, header, footer, and group. Additionally, dynamic slots can be created for custom content.

#toolbar

The #toolbar slot allows you to customize the toolbar section of the table. This is useful for adding custom buttons, filters, or additional controls.

Name table
Name
Color
Weight (grams)
Strawberry
Green
1477
Peach
Red
275
Strawberry
Green
408
Apple
Orange
1817
Apple
Red
812
<Table
    :data-source="tableData"
    :toolbar="{ visible: true }">
  <template #toolbar>
    <button @click="addRow">Add Row</button>
  </template>
</Table>

Note: To display the toolbar, the visible property must be explicitly set to true in the toolbar configuration.

By using the #toolbar slot, you can inject custom content into the toolbar area while ensuring it is visible by setting visible: true.

The #header slot enables you to customize the header of the table. You can modify the appearance of column headers or add additional elements.

Name table
Name
Color
Weight (grams)
Kiwi
Pink
295
Kiwi
Purple
501
Watermelon
Red
722
Strawberry
Purple
1518
Peach
Pink
1967
<Table :data-source="tableData">
  <template #header>
    <div class="custom-header">My Custom Header</div>
  </template>
</Table>

Use the #header slot to replace or enhance the default table header.

#group

The #group slot is used to customize the appearance of grouped rows. This is especially useful when you want to add custom visuals or formatting to grouped data.

  • item: The grouped item.
  • length: The total number of grouped items.
Name
Color
Weight (grams)
Purple
Strawberry
Purple
1388
Grapes
Purple
971
Grapes
Purple
1835
Pineapple
Purple
1819
Red
Watermelon
Red
742
<Table :data-source="groupedData">
  <template #group="{ item, length }">
    <div class="custom-group">
      {{ item }} ({{ length }} items)
    </div>
  </template>
</Table>

Use the #group slot to define how grouped rows should be displayed.

The #footer slot allows you to customize the footer section of the table. This is useful for adding summaries, pagination controls, or other custom elements.

Name
Color
Weight (grams)
Strawberry
Yellow
1753
Orange
Purple
828
Mango
Pink
706
Grapes
Purple
1509
Watermelon
Red
1097
<Table :data-source="tableData">
  <template #footer>
    <div>Total Rows: {{ tableData.length }}</div>
  </template>
</Table>

Use the #footer slot to add content or functionality to the table footer.

Dynamic Slots

In addition to the predefined slots, dynamic slots allow you to customize content for specific table cells or components dynamically. Dynamic slots use keys to target specific columns or rows.

The following arguments are passed to dynamic slots:

  • name: The name of the slot.
  • key: The key of the column or row.
  • column: The column configuration object.
  • rowData: The data for the current row.
  • value: The value of the cell.
  • valueWithMarker: The value of the cell with any markers applied.
  • isCloseEditor: A function to control whether the cell editor should close.
  • editValue: A function to edit the cell's value.
Name
Color
Weight (grams)
Pineapple
Green
311
Kiwi
Yellow
689
Peach
Orange
856
Mango
Purple
874
Kiwi
Red
1234
<Table :data-source="tableData">
  <template #customSlot="{ value }">
    <div class="custom-cell">
      {{ value }}
    </div>
  </template>
</Table>

Dynamic slots provide flexibility for customizing individual cells or rows based on the provided arguments.

Styles

This section provides options for customizing the appearance and styling of the table. You can control styling modes, apply custom CSS classes, and configure detailed style properties.

mode

The mode property specifies the overall styling mode of the table. The available options are:

  • "filled": A solid-filled table style.
  • "outlined": A table with outlined borders.
  • "underlined": A table with underlined rows or columns.
Mode
Apple
Orange
1863
Strawberry
Green
375
Apple
Green
1730
Banana
Purple
89
Apple
Red
606
<Table
    :columns="true" 
    :summary="true" 
    :filter="true"
    :data-source="tableData" 
    :mode="'outlined'">
</Table>

Set mode to define the overall look and feel of the table.

noData

The noData property specifies the message to display when there is no data available in the table.

No data available at the moment.
<Table 
    :data-source="[]" 
    :noData="'No data available at the moment.'">
</Table>

In this example, the message "No data available at the moment." will be shown when the data source is empty.

noColumn

The noColumn property specifies the message to display when no columns are defined in the table.

No columns defined for the table.
<Table 
    :data-source="[{}]" 
    :noColumn="'No columns defined for the table.'">
</Table>

Here, the message "No columns defined for the table." will be displayed when no column configurations are provided.

class

The class property allows you to apply custom CSS classes to the table container for additional styling.

Banana
Purple
1495
Grapes
Green
151
Mango
Purple
1535
Watermelon
Purple
1898
Pineapple
Yellow
855
<Table 
    :data-source="tableData" 
    :class="'custom-table-class'">
</Table>

Use class to apply custom styles like padding, colors, or borders to the table container.

styles

The styles property provides a comprehensive way to configure the appearance of the table. Below are examples showcasing different configurations of the styles property.

Custom class and border

You can define custom CSS classes and border styles for the table.

Table zones
Table border
Toolbar
Find...
Header
Pink
Banana
Pink
98
Orange
Pink
757
Kiwi
Pink
1415
Watermelon
Pink
1792
Pineapple
Pink
1758
Footer
<Table 
    :data-source="tableData" 
    :styles="{
        class: 'custom-table-class',
        border: 'custom-table-border'
    }">
</Table>

In this example, a custom CSS class is applied, and only the bottom border is displayed.

Custom width and height

You can configure the table's width and height to fit your layout.

Width
Height
Find...
Yellow
Orange
Yellow
1828
Strawberry
Yellow
552
Peach
Yellow
1104
Pineapple
Yellow
443
Grapes
Yellow
409
1/3
<Table 
    :data-source="tableData" 
    :styles="{
        width: '100%',
        height: '500px'
    }">
</Table>

This example sets the table to occupy 100% of the container's width and a fixed height of 500 pixels.

hoverRows and isStripedRows

Enable hover effects and striped rows for better row visualization.

Hover selection
Alternating lines
Peach
Green
1652
Peach
Yellow
84
Mango
Yellow
1818
Strawberry
Orange
703
Kiwi
Purple
199
<Table 
    :data-source="tableData" 
    :styles="{
        hoverRows: true,
        isStripedRows: true
    }">
</Table>

Here, rows change appearance on hover, and alternating row stripes are enabled.

horizontalLines, verticalLines, and filterLines

Control the display of horizontal and vertical lines, and enable or disable filter lines.

Horizontal Lines
Vertical Lines
Filter Lines
Orange
Pink
1770
Banana
Green
1351
Mango
Green
344
Banana
Yellow
1198
Apple
Purple
1222
<Table 
    :data-source="tableData" 
    :styles="{
        horizontalLines: true,
        verticalLines: true,
        filterLines: true
    }">
</Table>

This example ensures that both row and column dividers are visible, and filter lines are displayed.

borderRadiusPx and heightCell

Adjust the border radius and the height of table cells for a more customized design.

Border Radius (px)
Cell Height
Orange
Pink
1728
Pineapple
Yellow
1002
Kiwi
Orange
115
Banana
Purple
1491
Mango
Orange
1186
<Table 
    :data-source="tableData" 
    :styles="{
        borderRadiusPx: 10,
        heightCell: 50
    }">
</Table>

In this example, the table has rounded corners (10px radius), and each row is 50 pixels high.

Styles Overview

The styles property provides a flexible and comprehensive way to customize the appearance of your table. You can define everything from dimensions, hover effects, and row styling to animations, borders, and text formatting. This allows for a highly tailored design that aligns with the visual requirements of your application.

  • class: CSS class styles for various parts of the table.
  • width: The width of the table (e.g., "100%", "800px").
  • height: The height of the table (e.g., "500px").
  • hoverRows: Styles applied when hovering over rows (e.g., "hover:bg-neutral-100/90").
  • isStripedRows: Enable or disable striped row styling.
  • horizontalLines: Show or hide horizontal lines between rows.
  • verticalLines: Show or hide vertical lines between columns.
  • filterLines: Display filter lines.
  • borderRadiusPx: Border radius for the table (in pixels).
  • heightCell: Height of table cells (in pixels).
  • defaultWidthColumn: Default column width (e.g., "max-width: 600px;min-width:100px;width:auto").
  • maskQuery: Query text styling (e.g., "font-bold text-theme-700 dark:text-theme-300").
  • animation: Animation styles like "transition-all duration-500" or "transition-none".
  • border: Border styles for the table (e.g., "border-0" or "border-t-0 border-b-0").

Use the styles property to define a detailed and cohesive appearance for your table, covering all aspects from dimensions to hover effects.

Column styling

The class property allows you to apply custom CSS classes for various parts of the column, including the header, filter, and cell content.

th

Apply a custom CSS class to the header cell (th). This allows you to customize the appearance of the table header cells according to your design needs.

Name
Color
Weight (grams)
Orange
Yellow
176
Peach
Pink
589
Watermelon
Yellow
361
Orange
Yellow
893
Apple
Orange
444
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{
  dataField: 'name',
  class: { th: 'class-th' }
}];
</script>

colFilter

The colFilter property allows you to apply a custom CSS class to the column filter input, enabling you to style the filter input elements.

Name
Color
Weight (grams)
Kiwi
Pink
1122
Mango
Orange
1151
Mango
Red
294
Pineapple
Red
838
Pineapple
Orange
893
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{
  dataField: 'name',
  class: { colFilter: 'class-col-filter' }
}];
</script>

colFilterClass

Use the colFilterClass property to apply a custom CSS class to the column filter container, allowing for precise styling of the filter container.

Name
Color
Weight (grams)
Pineapple
Orange
1544
Watermelon
Green
1828
Apple
Green
131
Watermelon
Yellow
452
Pineapple
Pink
1055
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{
  dataField: 'name',
  class: { colFilterClass: 'class-col-filter-container' }
}];
</script>

colFilterClassBody

The colFilterClassBody property allows you to apply a custom CSS class to the column filter body, providing additional control over the styling of the filter body.

Name
Color
Weight (grams)
Strawberry
Orange
843
Kiwi
Red
89
Watermelon
Pink
219
Peach
Yellow
1740
Strawberry
Orange
1558
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{
  dataField: 'name',
  class: { colFilterClassBody: 'class-col-filter-body' }
}];
</script>

colText

Use the colText property to apply a custom CSS class to the text content in the column header. This property helps in adjusting the text style within the header cells.

Name
Color
Weight (grams)
Apple
Orange
1223
Apple
Orange
1851
Banana
Green
288
Kiwi
Red
665
Watermelon
Yellow
417
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{
  dataField: 'name',
  class: { colText: 'class-col-text' }
}];
</script>

td

Apply a custom CSS class to the table data cells (td). This property allows you to customize the appearance of the table data cells.

Name
Color
Weight (grams)
Pineapple
Purple
677
Orange
Orange
1488
Kiwi
Pink
1009
Grapes
Red
273
Pineapple
Red
665
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{
  dataField: 'name',
  class: { td: 'class-td' }
}];
</script>

cellText

The cellText property allows you to apply a custom CSS class to the text content within the cells. This provides control over the styling of the cell text.

Name
Color
Weight (grams)
Strawberry
Yellow
1157
Apple
Red
1781
Strawberry
Green
1054
Kiwi
Pink
1219
Grapes
Purple
1618
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{
  dataField: 'name',
  class: { cellText: 'class-cell-text' }
}];
</script>

tf

The tf property allows you to apply a custom CSS class to the footer cell (tf). This is useful for customizing the appearance of the footer cells.

Name
Color
Weight (grams)
Apple
Yellow
597
Strawberry
Pink
332
Mango
Green
687
Banana
Red
1411
Apple
Red
738
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
const tableData = [{ id: 1, name: 'John Doe' }];
const columns = [{
  dataField: 'name',
  class: { tf: 'class-tf' }
}];
</script>

sumText

Use the sumText property to apply a custom CSS class to the summary text in the footer. This property helps in adjusting the style of the summary text within the footer cells.

Name
Color
Weight (grams)
Watermelon
Red
1458
Peach
Purple
279
Orange
Green
1572
Kiwi
Red
568
Grapes
Purple
730
<template>
  <Table :data-source="tableData" :columns="columns" />
</template>

<script setup lang="ts">
  const tableData = [{ id: 1, name: 'John Doe' }];
  const columns = [{
    dataField: 'name',
    class: { sumText: 'class-sum-text' }
  }];
</script>

Edit

The table supports editing functionality, which allows you to add, update, and delete rows of data. This feature can be enabled for the entire table or configured at the column level for greater flexibility.

Enabling Editing Mode

To enable editing for the entire table, use the :edit property and set it to true:

Name
Role
Created At
Updated At
Bob
admin
24.02.2026
26.11.2023
Bob
user
18.01.2023
29.01.2024
Ivan
user
03.02.2022
13.02.2024
Ivan
admin
06.04.2022
18.04.2024
Ivan
user
29.12.2024
05.10.2024
<Table 
    :data-source="tableData" 
    :edit="true">
</Table>

This enables editing for all columns in the table.

Column-Level Editing

You can enable or disable editing for specific columns by using the edit option within the column configuration. This allows you to customize which columns can be edited.

Name
Age
Role
Bob
admin
Bob
user
Ivan
user
Ivan
admin
Ivan
user
<Table 
    :columns="[
        { name: 'name', edit: false }, // Editing disabled for this column
        { name: 'age', edit: true },
        { name: 'role', edit: true }
    ]"
    :data-source="tableData">
</Table>

In this example, editing is enabled for the id and name columns but disabled for the age column.

<Table 
    :edit="true" 
    :columns="[
        { name: 'id', edit: false }, // Editing disabled for this column
        { name: 'name', edit: true }, // Editing remains enabled
    ]"
    :data-source="tableData">
</Table>

This combination enables editing for the entire table but excludes specific columns from being editable.

Configuring Cell Editors

The table provides the ability to customize the editor for each cell based on the column's data type. This is achieved using the edit option within the column configuration:

Column Editor Options

columns: [
  {
    name: 'exampleColumn',
    type: 'string' | 'number' | 'select' | 'date', // Data type for the column
    edit: {
      isEdit?: boolean, // Additional flag to enable or disable editing
      editorOptions?: Partial<BaseInputProps> | Partial<BaseSelectProps> | Partial<BaseCalendarProps> // Editor configuration
    }
  }
]
  • type: Defines the type of data in the column ("string", "number", "select", or "date").
  • editorOptions: Specifies additional configuration for the editor based on the type of data.

Refer to the relevant documentation for more details:

Input Field Properties

For configuration options when using input fields ("string" or "number" types`), explore the Input Field properties.

Select Field Properties

For configuration options when using select fields ("select" type), explore the Select Field properties.

Date Field Properties

For configuration options when using date fields ("date" type), explore the Date Field properties.

Data Editing

The table provides a set of methods to dynamically edit, manipulate, and interact with its data. These methods are accessible through the refLink of the table and allow for functionality such as adding, updating, deleting rows, and more.

For a complete list of available methods and their usage, refer to the Table API documentation.

Table API Documentation

Explore all the available methods for table editing, including addRow, deleteRow, updateRow, and more, in the Table API documentation.

© 2025 FishtVue by Egoka