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
Orange
Purple
110
Watermelon
Purple
55
Grapes
Pink
1687
Kiwi
Purple
727
Watermelon
Yellow
70
<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
City Center Inn
2
232
Mountain Lodge
4
180
Skyline Hotel
3
276
Mountain Lodge
5
159
Mountain Lodge
4
81
<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
Skyline Hotel
Germany
4
Ocean View
Germany
3
City Center Inn
Thailand
5
Grand Palace
Italy
5
Mountain Lodge
Canada
5
<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
Sports Event
07.06.2022
07.07.2022
19.03.2023
24.02.2023
Sports Event
19.08.2023
22.04.2025
13.03.2023
03.04.2023
Exhibition
29.08.2023
07.02.2026
19.03.2023
19.01.2023
Festival
08.07.2025
13.02.2026
18.08.2023
26.08.2023
Concert
13.11.2025
29.10.2025
13.05.2023
14.06.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)
Strawberry
Purple
1342
Watermelon
Red
874
Peach
Yellow
704
Pineapple
Purple
1785
Kiwi
Green
537
<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
Kiwi
Purple
Mango
Yellow
Peach
Red
Kiwi
Red
Mango
Pink
<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)
Peach
Pink
1290
Peach
Yellow
1680
Strawberry
Yellow
1688
Strawberry
Purple
1974
Strawberry
Red
131
<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)
Pineapple
Red
1112
Orange
Red
1386
Strawberry
Purple
378
Banana
Yellow
647
Grapes
Red
1592
<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)
Kiwi
Yellow
419
Mango
Yellow
662
Mango
Orange
1925
Strawberry
Red
286
Banana
Green
80
<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)
Kiwi
Purple
2.37
Mango
Red
7.35
Pineapple
Purple
7.60
Banana
Pink
2.15
Peach
Red
3.78
<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)
Apple
Yellow
0.17
Peach
Green
2.43
Orange
Orange
3.35
Orange
Green
8.62
Mango
Purple
1.09
<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)
Apple
Purple
8.96
Banana
Purple
1.17
Watermelon
Yellow
5.43
Orange
Pink
5.83
Watermelon
Orange
1.38
<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)
Mustang
Silver
85043
EV6
White
85366
X5
White
92696
A4
White
47129
A4
Black
54184
<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)
EV6
Silver
20784
X5
Silver
86435
Camry
Green
14763
Mustang
Red
6760
A4
Red
54863
<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)
Model S
75 705
17 467
Camry
167 150
54 474
Model S
89 881
57 211
Camry
49 782
11 004
EV6
168 710
51 429
<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
City Center Inn
Canada
yes
Mountain Lodge
USA
yes
Skyline Hotel
Canada
yes
City Center Inn
Japan
no
Ocean View
Canada
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)
Model S
2002 year
32600 km
$ 68620
Civic
2025 year
146043 km
$ 60748
Mustang
2001 year
96020 km
$ 39571
X5
2007 year
193624 km
$ 63935
Corolla
2025 year
103285 km
$ 52008
<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)
Peach
Yellow
1142
Pineapple
Green
1442
Apple
Pink
168
Watermelon
Green
1120
Apple
Yellow
811
<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)
Kiwi
Purple
375
Grapes
Green
1441
Mango
Red
1911
Apple
Pink
912
Apple
Orange
1554
<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
Green
557
Pineapple
Purple
1121
Watermelon
Red
117
Mango
Red
358
Pineapple
Orange
1220
<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)
Kiwi
Red
793
Apple
Green
1146
Strawberry
Pink
644
Kiwi
Green
413
Watermelon
Orange
1667
<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)
Red
Banana
Red
1734
Watermelon
Red
335
Pink
Mango
Pink
883
Yellow
Peach
Yellow
1338
Purple
Pineapple
Purple
989
<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
Mango
Orange
1603
false
Thailand
2.88
Peach
Yellow
1733
false
Thailand
9.17
Watermelon
Pink
1594
true
Mexico
5.36
Orange
Yellow
1626
true
China
6.53
Banana
Red
1075
true
China
8.37
<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)
Apple
Yellow
454
Banana
Green
173
Banana
Orange
117
Pineapple
Green
1411
Apple
Purple
606
<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)
Orange
Green
1394
Kiwi
Purple
1583
Kiwi
Pink
358
Pineapple
Orange
353
Strawberry
Orange
967
<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.

Peach
Pink
1200
Orange
Pink
1078
Strawberry
Yellow
94
Banana
Orange
1561
Watermelon
Orange
1794
Кол. 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
Daily Statistics
80218
700232
38415
556
Weekly Summary
52326
690992
41278
703
Monthly Report
62403
950287
25549
479
Monthly Report
71550
27227
14697
711
Yearly Overview
76195
72522
11585
560
Count: 5
Avg: 68538
Min: 27227
Max: 41278
Sum: 3009
<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
87047
669763
27482
222
Quarterly Analysis
32734
876477
46563
403
Monthly Report
14052
354678
16637
323
Quarterly Analysis
89261
769907
12407
441
Monthly Report
11730
176526
18242
555
Name: 5 (count)
Total Users: 46965 (avg)
Total Revenue: 176526 (min)
Active Users: 46563 (max)
New Users Today: 1944 (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
Mango
Pink
1961
true
Mexico
7.53
Mango
Orange
1093
false
India
0.84
Peach
Red
201
true
Mexico
1.89
Banana
Yellow
133
true
Spain
5.32
Kiwi
Orange
1960
true
Thailand
9.22
1/100
<Table :data-source="tableData" pagination></Table>

This enables pagination with the default configuration.

Visible
Pineapple
Yellow
1286
true
Mexico
9.95
Kiwi
Yellow
1330
false
Spain
3.04
Pineapple
Red
389
false
Mexico
0.65
Banana
Yellow
1491
false
Mexico
1.86
Grapes
Red
261
true
Brazil
5.71
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
Watermelon
Orange
1889
true
Brazil
1.78
Kiwi
Purple
1193
false
USA
7.60
Pineapple
Green
1645
true
China
8.89
Orange
Red
643
false
China
4.01
Strawberry
Green
1754
true
India
3.90
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.

Mango
Yellow
1228
true
China
7.92
Grapes
Yellow
1369
true
Thailand
2.24
Pineapple
Purple
672
true
Brazil
4.30
Mango
Green
1297
true
China
2.17
Grapes
Red
843
false
USA
4.41
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
Strawberry
Pink
916
true
China
5.49
Peach
Green
983
false
USA
5.81
Mango
Yellow
894
false
Thailand
1.01
Watermelon
Yellow
263
false
Thailand
9.68
Grapes
Purple
250
false
Brazil
3.88
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.

Kiwi
Green
647
false
USA
2.61
Peach
Green
1743
false
China
9.20
Orange
Purple
1384
false
USA
3.35
Pineapple
Yellow
1494
true
Mexico
5.69
Pineapple
Red
1768
true
USA
5.52
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.

Mango
Yellow
1167
false
USA
2.86
Pineapple
Orange
1622
false
India
6.53
Pineapple
Purple
914
true
India
9.10
Watermelon
Yellow
1911
false
China
0.60
Banana
Pink
529
true
Thailand
7.22
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."

Mango
Green
626
false
India
5.90
Apple
Red
1443
false
Spain
1.84
Grapes
Pink
470
false
USA
8.84
Strawberry
Pink
236
true
India
8.60
Kiwi
Pink
977
false
China
4.32
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.

Banana
Pink
84
false
Thailand
2.47
Strawberry
Yellow
90
false
USA
9.91
Pineapple
Orange
1176
true
Spain
1.18
Peach
Orange
783
true
India
8.62
Strawberry
Yellow
636
false
Mexico
2.03
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.

Grapes
Green
1454
false
Brazil
9.46
Mango
Yellow
1872
true
India
5.08
Grapes
Yellow
1282
false
Mexico
4.42
Orange
Red
562
true
China
9.16
Grapes
Orange
515
true
Brazil
2.28
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.

Strawberry
Red
1568
false
USA
4.88
Orange
Orange
1220
true
Spain
3.24
Watermelon
Orange
466
false
USA
3.37
Banana
Pink
743
true
China
0.33
Orange
Purple
673
false
China
3.32
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
1205
Apple
Purple
864
Banana
Purple
693
Apple
Red
1232
Grapes
Purple
462
<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)
Orange
Pink
187
Orange
Red
1760
Apple
Yellow
926
Orange
Pink
1436
Banana
Yellow
164
<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)
Pink
Apple
Pink
1169
Strawberry
Pink
1541
Grapes
Pink
1324
Mango
Pink
1443
Pineapple
Pink
1088
<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)
Mango
Green
1508
Watermelon
Orange
1313
Grapes
Yellow
1543
Mango
Orange
1664
Mango
Red
721
<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
Yellow
446
Mango
Purple
1564
Kiwi
Yellow
1353
Strawberry
Pink
1276
Peach
Yellow
427
<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
Mango
Purple
1296
Watermelon
Yellow
1312
Peach
Red
1487
Kiwi
Pink
1319
Apple
Yellow
1214
<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
Pink
1256
Pineapple
Pink
1432
Banana
Green
1512
Mango
Pink
314
Orange
Red
1172
<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
Pineapple
Pink
899
Watermelon
Pink
1649
Pineapple
Pink
1515
Strawberry
Pink
1173
Watermelon
Pink
419
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...
Purple
Apple
Purple
1495
Kiwi
Purple
494
Watermelon
Purple
340
Banana
Purple
1007
Grapes
Purple
492
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
Kiwi
Orange
1741
Kiwi
Red
538
Kiwi
Red
1378
Peach
Pink
1878
Watermelon
Yellow
1010
<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
Grapes
Orange
1476
Peach
Red
139
Pineapple
Red
598
Peach
Green
1453
Pineapple
Purple
1259
<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
Watermelon
Orange
684
Kiwi
Purple
967
Banana
Green
1816
Strawberry
Orange
1960
Pineapple
Yellow
1900
<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)
Strawberry
Pink
1865
Mango
Red
1087
Apple
Red
1117
Grapes
Orange
1471
Mango
Green
547
<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)
Orange
Red
1232
Orange
Yellow
1265
Grapes
Yellow
644
Banana
Red
1968
Watermelon
Green
427
<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
Yellow
1665
Pineapple
Yellow
997
Pineapple
Yellow
1709
Banana
Green
278
Pineapple
Orange
265
<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)
Watermelon
Red
424
Watermelon
Purple
1155
Kiwi
Pink
1126
Grapes
Red
1786
Kiwi
Purple
1789
<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)
Mango
Red
792
Watermelon
Orange
1981
Strawberry
Yellow
458
Banana
Green
73
Peach
Red
1089
<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)
Orange
Yellow
684
Apple
Red
263
Orange
Pink
1347
Orange
Green
995
Pineapple
Purple
1472
<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)
Orange
Green
1677
Peach
Orange
202
Pineapple
Pink
599
Peach
Green
332
Strawberry
Red
90
<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)
Mango
Purple
384
Apple
Orange
925
Watermelon
Red
1555
Apple
Purple
810
Peach
Yellow
808
<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)
Orange
Orange
334
Orange
Red
283
Apple
Purple
985
Kiwi
Pink
1624
Peach
Orange
502
<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
Frank
guest
07.07.2023
25.12.2023
Bob
guest
11.11.2025
20.10.2023
Charlie
user
09.04.2023
17.08.2025
Grace
admin
26.02.2022
08.05.2022
Eve
user
04.06.2024
21.11.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
Frank
guest
Bob
guest
Charlie
user
Grace
admin
Eve
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