UI Bakery Docs
RoadmapRelease notesSign In
  • 👋Welcome to UI Bakery!
  • 🌟Overview
    • 💡Video intro
    • ✨Main features
    • 🔖Glossary
  • 🛠️Getting started
    • Create an application
    • Build UI
      • Data mocking methods
    • Link components
    • Connect a data source
    • Load data
    • Bind data to UI
    • Transform data with JavaScript
      • Data mapping & transforming
    • Change component data
    • Send a form
    • Create a filter
    • Note on debugging
    • Deploy your application & invite users
  • 📌Concepts
    • Components
      • Component basics
      • Component methods
      • Components best practices
        • Input validation
        • Linking a Table to a Form/Detail
        • Using a single Form to add and update data
        • Searching Table based on input value
        • Configuring server-side pagination
        • Managing Date object time zones
        • Role-based Menu component items
        • Field types & types recognition
          • Select/Tag field: Utilizing Tag mapper
        • Expanding component to fit screen/container
        • Controlling component's visibility
    • Custom components
      • Unrestricted custom components
    • Data sources
      • Data source environments
      • Connecting local database via ngrok
      • SSH Tunneling
    • Actions
      • Actions basics
        • Calling actions from code
      • Actions management & shortcuts
      • Actions settings
      • Actions library
      • Server actions
      • Logs and debugging
    • UI Bakery variables
    • State variables
    • Local storage
    • Modules
    • Custom JavaScript
      • JavaScript files
    • Workspace management
      • Account & workspace
      • Seats & Shared permission groups in UI Bakery
      • Roles in UI Bakery
      • Role permissions
      • Explore the interface
      • App environments
        • Release management
      • Audit logs
      • Multi-factor authentication
    • Export & import an app
    • Mobile layout
    • Theme editor
      • Changing theme from the app
    • UI Bakery source control
      • Git controls overview
      • Migrating your app model to the latest version
  • ⚡How-tos
    • File management
      • Working with PDF files
      • CSV import & export
      • Uploading files using methods
      • Displaying files from Google Drive and Dropbox
      • Parsing and sending XML
    • Styling
      • Modifying components with CSS
    • Layout & navigation
      • Adding navigation to application
      • Reading query params from URL
      • Hiding UI Bakery loader in the Embedded mode
    • Data
      • Managing user data with the {{user.email}} variable
      • Using JS libraries
        • Internationalization (i18n) & Localization: Translating UI Bakery Apps
      • Implementing row-level security
      • Copying to clipboard
    • Custom code
      • Communicating with external sites via Iframe
      • Implementing custom app hotkeys
      • Retrying API with HTTP status code 202
  • 🔎Extras
    • UI Bakery Automations
      • Environment and release strategy
      • Git in automations
      • Using external Node libraries
    • UI Bakery Database
      • Database migration
  • 💻On-premise
    • UI Bakery on-premise
    • Install & update
      • Installing on-premise
        • Azure virtual machine
        • Azure container instance
        • AWS EC2 instance
        • Google Cloud Compute Engine VM instance
        • DigitalOcean 1-click droplet
        • Manual w/ docker compose
        • Manual w/ docker run
        • Windows installation
        • Kubernetes
          • AWS EKS with Fargate
          • Scaling and resource optimization
      • Troubleshooting installation errors
      • Updating on-premise
      • Updating license key
      • Updating environment variables
      • Recommendations
        • Architecture overview
        • UI Bakery in production
        • Resource optimization
        • Running a standalone database instance
        • Generating custom secrets
    • On-premise features
      • External analytics
      • Branding
      • Embedding
      • SCIM 2.0
      • Instance API
      • Activating features under a feature flag
    • Additional configurations
      • Health check API
      • Email configuration
      • Google Sheets connection setup
      • Salesforce connection setup
      • Azure blob storage configuration
      • Adding python backend code to existing installation
      • UI Bakery Postgres
    • Networking & security
      • Setting up a domain name
      • Configuring custom certificate authority
      • Custom base URL
      • Getting requests to the local network
      • Setting up SSL on Ubuntu
    • SSO
      • OpenID
        • Google OAuth2
        • Okta ODIC
        • Azure AD OAuth2
        • Token refresh
      • SAML
        • Okta SAML
        • Azure AD SAML
      • Role synchronization
      • Multiple SSO
      • Logout redirect
      • Troubleshooting
    • Git source control
      • Manage multi-instance deployment
      • Custom PR URL
      • Automate GitHub releases
      • Automate GitLab releases
      • Automate Bitbucket releases
    • Environment variables
  • 📚Reference
    • Data security measures
    • Improving app security
    • ✨AI Assistant
    • List of Components
      • Azure Blob Storage file uploader
      • Accordion
      • Alert
      • Avatar
      • Boolean
      • Breadcrumbs
      • Bubble map
      • Button
      • Card
      • Chart
      • Chat
      • Checkbox
      • Collapsible card
      • Color picker
      • Composite form
      • Container
      • Context menu button
      • Currency
      • Currency input
      • Date picker
      • Date & time
      • Date & time picker
      • Detail
      • Divider
      • Email input
      • Embedded App
      • File
      • File dropzone
      • File picker
      • Flex container
      • Form
      • Frame drawer
      • Grid view
      • Heading
      • Horizontal menu
      • Icon
      • iFrame
      • Image
      • Image picker
      • JSON editor
      • JSON viewer
      • Link
      • List view
      • Map
      • Menu
      • Metric
      • Modal
      • Multi-select
      • Number
      • Number input
      • Password input
      • PDF viewer
      • Percent
      • Pop-up form
      • Progress bar
      • QR code
      • Radio
      • Range slider
      • Rating
      • Reusable header
      • Reusable sidebar
      • Select
      • Signature
      • Slider
      • Steps
      • Stepper
      • S3 file uploader
      • Table
        • Conditional formatting based on cell value
        • Display name instead of ID for relation
        • Row context referencing
        • Select multiple table rows
        • How to Highlight Text in a Table Using mark.js
      • Tabs
      • Tabset
      • Tags
      • Text
      • Text annotate
      • Text input
      • Time picker
      • Toggle
      • Tree component
      • Video
      • Dynamic structure properties
      • Card (deprecated)
      • Input (deprecated)
    • Upgrading components
    • List of Data sources
      • Airtable
      • AWS API
      • AWS Athena
      • AWS DynamoDB
      • AWS Lambda
      • AWS Redshift
      • AWS S3
        • S3 compatible endpoints (DigitalOcean spaces)
      • Azure Blob Storage
      • Big Query
      • Databricks
      • Exasol
      • Firestore, Firebase Auth & Realtime DB
        • Firebase authentication
        • Managing database data
        • Firebase client-side SDK
        • Firebase libraries
      • GitHub
      • Google Sheets
      • GraphQL
      • HTTP API
        • API Authentication
      • HubSpot
      • JDBC
      • MariaDB
      • MongoDB
      • MySQL
      • OpenAI
      • OpenAPI
      • Oracle
      • PostgreSQL
      • Presto
      • Redis
      • Salesforce
      • SAP Hana
      • SendGrid
      • Slack
      • SMTP
      • Snowflake
      • Spanner
      • SSH
      • Stripe
      • SQL Server
      • Supabase
      • Twilio
      • UI Bakery AI
    • List of Action steps
      • AI Action
      • Azure Blob Storage Query
      • Bulk Create Rows
      • Bulk Delete Rows
      • Condition
      • Create Row
      • Delete Row
      • DynamoDB Request
      • Execute Action
      • Firebase Query
      • Generate File
      • GraphQL Query
      • HTTP Request
      • Interval
      • JavaScript Code
      • Load Table
      • Load Row
      • Loop Action
      • MongoDB Command
      • Navigate
      • Open API Request
      • Python Backend Code
      • Redis Command
      • Save to Local Storage
      • Save to State
      • Show Notification
      • Slack messages
      • SMTP Request
      • SSH Command
      • SQL Query
        • Writing SQL Queries
      • S3 Query
      • Update Row
    • Troubleshooting techniques
    • Performance optimization
Powered by GitBook

© 2025 UI Bakery

On this page
  • Columns
  • Methods
  • Triggers
  • Displaying the data
  • Adding a search bar to the table
  • Adding table filters
  • Setting up filter type
  • Adding filters programmatically
  • Sorting table columns
  • Dynamic columns
  • Reloading data in the table
  • Edit table records
  • Bulk edit
  • Formatting table cells based on a condition
  • Refreshing the data in a table on an interval
  • Adding an action button to the table
  • Displaying a confirmation dialog for the Delete action
  • Hiding a button based on a condition
  • Hiding CSV export button
  • Using data mapper
  • Referencing row context
  • Server-side pagination

Was this helpful?

Export as PDF
  1. Reference
  2. List of Components

Table

PreviousS3 file uploaderNextConditional formatting based on cell value

Last updated 5 months ago

Was this helpful?

Table is the most standard way to present your data. Let's explore all the possibilities of a table component in the below guide. We will cover the basics such as adding a table and displaying the data, as well as go through some additional options, such as filtering and sorting the values, adding, editing and deleting the values directly from the table.

Columns

UI Bakery columns support the below data types:

  • String

  • Long Text

  • Number

  • Currency

  • Link

  • Percent

  • Boolean

  • Date & Time

  • Date

  • Time

  • JSON

  • Select/ Tag

  • Multi-select/ Tags

  • Button

  • Image

  • File

Methods

Method
Description

setData(data: Array)

sets data in the table

selectRow(rowNumber: number)

selects row in a table by row number

setFilters({[column]: string | number | boolean | array;})

sets filters in the table by a certain column

resetFilters()

resets the filters

setSort(column:string, direction:string)

sets table sorting (asc, desc)

setPage(index: number)

sets navigation to a specific page in the table

setPageSize(size: number)

sets the amount of items per page in the table

openRowEditing(index: number)

enables editing mode on row, the page with that row will open

submitRowEditing(index: number)

submits an edited row and closes editing mode, the page with that row will open

cancelRowEditing(index: number)

dismisses edited row and closes editing mode

openBulkEditing()

enables bulk editing mode on table

submitBulkEditing()

submits edited rows and closes bulk editing mode

cancelBulkEditing()

dismisses edited rows and closes bulk editing mode

openRowAddition()

enables row adding mode on table

submitRowAddition()

submits new row and closes row adding mode

cancelRowAddition()

dismisses added row and closes row adding mode

Triggers

Triggers allow you to launch certain actions based on different events.

On Init

Calls for an action on component initialization, e.g., page refresh.

On Create

Calls for a create action as you create a record from the table.

On Edit

Calls for an update action as you update a selected record.

On Bulk Edit

Calls for an action on your click to Save button of the bulk edit buttons.

On Delete

Calls for a delete action as you delete a record.

On Row Select

Allows you to call an action as you select a row in a table, e.g., to load the record's details inside a connected component.

On Row Click

Allows you to call an action as you click a row in a table.

On Row Double Click

Allows you to call an action as you double-click a row in a table.

On Page Change

Calls for an action as you change the table page.

On Items Per Page Change

Calls for an action as you change the number of records displayed per table page.

On Filters Change

Calls for an action as you change the table inline filters.

On Sort Change

Calls for an action as you change the table column sort order.

On Reload

Calls for an action as you click on the table reload button.

On Cell Change

Calls for an action as you make changes to the table cell.

Displaying the data

Let's start by dragging the table onto the working area. By default, the table contains some test data so if you don't have any actions yet, you'll see some pre-populated data:

[
  {
    "id": 1,
    "full_name": "Susan Williamson",
    "first_name": "Susan",
    "last_name": "Williamson",
    "username": "sWilliamson",
    "avatar": "https://sauibakeryprod.blob.core.windows.net/mock-database-assets/users-avatars/user-00.png",
    "email": "Kyla_Considine@hotmail.com",
    "email_verified": true,
    "phone": "808.797.1741",
    "twitter_handle": "sWilliamson",
    "bio": "Friendly music geek. Organizer. Twitter scholar. Creator. General food nerd. Future teen idol. Thinker."
  },
  {
    "id": 2,
    "full_name": "Henrietta Wagner",
    "first_name": "Henrietta",
    "last_name": "Wagner",
    "username": "hWagner",
    "avatar": "https://sauibakeryprod.blob.core.windows.net/mock-database-assets/users-avatars/user-01.png",
    "email": "Betsy46@gmail.com",
    "email_verified": true,
    "phone": "903-894-7300",
    "twitter_handle": "hWagner",
    "bio": "Travel lover. Explorer. Analyst. Subtly charming pop culture aficionado. Friendly creator."
  } 
  ]

Now, you might notice a green button Connect my data in the Data field of the table. Let's click the button to create your first action to load the data.

As soon as you click the button, you'll be sent to the action panel. Choose an action to load your data, depending on your data source. It can either be an HTTP request, an SQL query, or a predefined Load Table action.

For example, we are using the sample UI Bakery MySQL data source and the Load Table action to get the data. As you run the action, you can notice that the sample data inside the table is replaced with the new data.

You will also notice that the reference in the Data field has changed from the sample code into the action result as {{actions.loadEmployees.data}}. Action results need to be referenced inside the curly double brackets {{}}.

Now that we have the data inside the table, let's add a search bar.

Adding a search bar to the table

The guide to adding a search bar is available here:

Adding table filters

The tables in UI Bakery come with predefined filters. To activate the filters, tick the Show inline table filter option.

If you don't need a filter for a specific column, you can disable it. Click on the column to open its' settings and untick the Show filter option.

Setting up filter type

The filter type can be also set. You can set either an Includes or Equal type. To set a filter type, follow these steps:

  • Start with toggling the Show inline table filter option;

  • After that, select the column for which you would like to set up a filter type, open its settings, and navigate to the Filter Settings section;

  • From there, choose the required filter type in the dropdown.

For the select/ multi-select field types, the filters work in the following way:

  • Includes searches for the occurrence of the entered string in the value (when the entered string is present in at least one of the elements of the row).

  • Intersection - when there are values in the array that completely match, they are checked using OR (i.e., at least one of the selected values should be present).

Adding filters programmatically

The filters can also be set programmatically. To make them visible, make sure that the Show inline table filter is on and the necessary field's Show filter option is also activated:

Case 1. Setting up a date and a number filter.

  1. To add a filter object, create a Code action. In the example, we are setting a date filter and an amount filter that will compare the cell value:

const startDate = moment().startOf('month');
const endDate = moment().endOf('month');
const itemsAmount = 100;
const filters = {	
    created_at: [startDate, endDate],	
    amount: itemsAmount,
}
{{ui.table.setFilters(filters)}};

After the code action is executed, the filters will be set in the table and available in the code, and the variable {{ui.table.filters}} will contain the following values: {created_at: [startDate, endDate], amount: [itemsAmount, null]}

Case 2. Adding more filters to the existing ones

To add more filters to those already set up, add a Code action with the code. In the example, we will add a filter to the condition column to look for a word ‘great' in the cells values:

const extraFilters = { condition: 'great'};
{{ui.table.setFilters(extraFilters)}};

After the code action is executed, the filters will be set in the table and available in the code, and the variable {{ui.table.filters}} will contain the following values: {created_at: [startDate, endDate], amount: [itemsAmount, null], condition: 'great'}

Case 3. Change a column-specific filter

To change one of the set filters, add a Code action with the code (for the example, we will remove the start date filter):

const resetCreatedAtStartDateFilter = { created_at: [null, endDate] };
{{ui.table.setFilters(resetCreatedAtStartDateFilter)}};

After the code action is executed, the filters will be set in the table and available in the code, and the variable {{ui.table.filters}} will contain the following values: {created_at: [null, endDate], amount: [itemsAmount, null], condition: 'great'}

Case 4. Remove an entire column filter

Option 1.

To remove the filter by a certain field, add a Code action with the code (we will remove the date filter):

const resetDateFilter = { created_at: null };
{{ui.table.setFilters(resetDateFilter)}};

After the code action is executed, the filters will be set in the table and available in the code, and the variable {{ui.table.filters}} will contain the following values: {amount: itemsAmount, condition: 'great'}

Option 2

Add a Code action that will define an array of column names we need to remove from the filter:

const columnsToReset = ['created_at'];
{{ui.table.resetFilters(columnsToReset)}};

After the code action is executed, the filters will be set in the table and available in the code, and the variable {{ui.table.filters}} will contain the following values: {amount: itemsAmount, condition: 'great'}

Case 5. Remove all filters

To remove all the previously set filters, add a Code action with the code:

{{ui.table.resetFilters()}}

After the code action is executed, the filters will be removed from the table, and the variable {{ui.table.filters}} will contain the following value: {}

Sorting table columns

To sort the data in your columns, just click on a column, by which you would like to apply the sorting.

Dynamic columns

The Table component allows dynamic configuration of its columns through the use of JavaScript mode.

Click a JS button next to the columns section to turn the dynamic mode.

Columns can be specified using an array of objects or strings. If an object is used, it can define properties such as

  • prop - data property to display

  • type - one of the available types: 'number', 'string', 'text', 'image', 'link', 'button', 'contextMenuButton', 'boolean', 'currency', 'date', 'datetime', 'file', 'jsoneditor', 'time', 'select', 'multiselect', ''

  • primaryKey, color, and text, among others.

The following is an example of how to use the component:

[
  'full_name',
  { prop: 'id', type: 'number', primaryKey: true, color: 'danger' }, 
  { prop: 'full_name' },
  { prop: 'avatar', type: 'image' },
  { prop: 'email', type: 'link' },
  { 
    prop: 'email',
    type: 'button',
    text: '\{\{value\}\}',
    triggers: {
        buttonClick: [ "console.log('Button click', \{\{value\}\})" ],
    },
  },
];

Default type if not specified - string. Required keys - prop, primaryKey (at least one column must be a primary key).

Reloading data in the table

If you need to reload the data in the table, you can use the Reload button. Find the On Reload Button Click trigger and assign the load data action on it. When required, the button can be hidden or shown on a certain condition.

Edit table records

Let's see how to make edits right from the table.

  1. Set the Edit action checkbox in the component settings sidebar. This should bring the edit button for each table row.

  2. Scroll down to the Triggers section. Find the On Edit trigger and click Add a new action.

  3. For the example, we'll be using the Update Row action type. Select the corresponding data source and the table.

  4. In the Configure record fields field**,** you can set up, which columns will be updated and how these will be mapped. If you would like to update all of the columns, switch to JS mode and refer to the updated values in the table like {{ui.tableName.editedRow.data}}.

  5. In the Configure which record(s) will be updated field, specify the unique record identifier. For the example case, this is a product code: product code = {{ui.tableName.selectedRow.data.productCode}}.

This action updates the record with the new data. What's left to do is to assign the data load action on the success trigger of the action, so that the table is updated with new data every time a record is edited.

Open the Triggers tab and On Success trigger, specify the load data action. Done!

Be cautious when using the ui.table.selectedRow.data or ui.table.clickedRow.data, variables as they may not always represent the value of the edited row and could lead to misleading results.

Bulk edit

You can enable the bulk edit option in a table. To do that, find the Bulk edit option in the table's settings:

If you need to manage the visibility of the option, you can activate the JS mode and specify the required condition.

You can also control which fields should be editable. In the column's settings, find the Edit settings - tick the checkbox Do not allow editing this field.

To configure a bulk edit action, follow the below steps:

  1. Enable the Bulk Edit option in the table.

  2. Create a new action - Loop. Since we are bulk editing, we'll need a loop action to handle the update for several records at once.

  3. Activate the Custom array to iterate option. In the appeared window, specify an array to which the loop action will be applied: {{ui.yourTable.bulkEditedRows}}.

  4. Next, select an action that will be called in a loop. Click Create new action.

  5. We will use an Update Row action type for the example, you can use an SQL query or a Code step depending on your data source.

  6. Specify the identifier for the records that will be updated following the pattern: {{params.data.record_id}}

  7. Then, specify the fields that will be updated. If you would like to update all the fields, you can switch to JS mode and specify {{params.data}}.

8. Finally, assign the bulk update action On Bulk Edit trigger of the table. Update the records to check the update in action.

Formatting table cells based on a condition

If you need to apply table/ cell formatting based on a certain condition, check out this guide:

Refreshing the data in a table on an interval

In case the data in your data source is dynamic and constantly changing, you can set up data refresh on a certain interval:

Adding an action button to the table

You can add an action button to your table in UI Bakery. Add a new column and change its type into a button. Adjust its text and appearance, assign a URL or an action that should be launched on a button On Click event:

Within the action, you can access the table row where the button is located using the {{ui.table.selectedRow.data}} variable. Make sure to enable the "Select row on click" checkbox for this feature to work.

Displaying a confirmation dialog for the Delete action

It's common to ask for confirmation before deleting a table row. This feature is built-in on the action level and available as a configuration for any UI Bakery action:

  • Open up your On Delete action and go to the Config tab;

  • Check the Show confirmation dialog setting to enable the dialog:

  • Additionally, you can change the confirmation text to reference a table row that the user is trying to delete: "Are you sure you want to delete user #{{ ui.table.deletedRow.data.id }}?"

Hiding a button based on a condition

To hide a button on a certain condition, follow these steps:

  1. Open the column's settings - View settings

  2. Find the Disable option, click Yes and open the JS code field

  3. Specify the required condition, e.g. in our example: {{row.status}} == 'Resolved'

Hiding CSV export button

The default CSV export button can be removed or hidden from the table under a certain condition. If you need to remove it for everyone, just select No on the Show export button setting. If you would like to show it based on a condition, switch to JS mode and specify the condition, e.g. {{user.role == 'admin'}}.

Using data mapper

You can use the mapper to make certain data modifications and formatting.

Let's say you have a table that stores some sensitive information, e.g. passwords, and you would like to hide them under *** in a view mode. Here's how to do that using the mapper:

  1. Open the settings of the passwords' column - View settings.

  2. In the mapper field, specify *** or any desired values.

Now, the passwords in the table will be hidden in the view mode, but visible when the user will update it.

Referencing row context

If you need to add references between table variables, you can use the row context option:

Server-side pagination

If you have a large dataset, you might want to use server-side pagination with a list view component. Please refer to the guide below for setup:

A list of all supported .

📚
Searching Table based on input value
properties can be found here
Conditional formatting based on cell value
Interval
Row context referencing
Configuring server-side pagination