LogoLogo
HomepageYouTube ChannelInstall from the AppExchange
  • Home
  • Dynamic Components
  • Flow Components
  • Experience Components
  • Projects
  • 👋Welcome
  • Getting Started
    • Product Tour
    • Quickstart Tutorial
    • Understanding The Essentials
      • Component Builder
      • Component Visibility
      • Target Page Object
      • Using Variables and Component Data
      • Publishing your Dynamic Components
      • Dynamic vs. Flow Components
    • Avonni Components App
      • Accessing the App
      • Folders
      • Templates
      • Version management
    • AppExchange Listing Page
    • Installation & Licenses Management
  • Tutorials
    • Projects
    • Components
      • Calendar
        • How to Create Events Quickly by Dragging
        • How to Add an Edit Action to Calendar Events
        • How to Add a New Event Button to the Calendar Header
        • How to Customize the Right-Click Menu
        • How to Reschedule Events with Drag and Drop
      • Columns
        • Creating a Responsive 3-Column Layout
      • Data Table
        • How to customize Data Table style
        • How to make a field editable
        • How to add clickable buttons
        • How to color-code badges
        • How to export data
        • How to configure search
        • How to set columns visibility
      • Kanban
        • Saving Changes on Drag-and-Drop
      • List
      • Metric
      • Record Detail
        • Saving Changes
    • Interactions
      • How to create an interaction to navigate to an object page
      • How to create an interaction to navigate to a record page
      • How to Pass Multiple Selected Records from a Dynamic Component to a Screen Flow
    • Reactive Components
      • Reactive Map and Data Table
      • Master-Detail Relationship with Data Tables
      • Vertical Tabs with Reactive Data Table
    • Style
      • How do you add space or a break between sections or fields?
    • Tips and Tricks
      • Using the Dynamic Component component
  • Component Builder
    • Overview
    • Configuring Components
      • Properties
      • Fields
      • Style
    • Data & Interactions
      • Data Sources
        • Manual
        • Picklist
      • Resources
        • Constant
        • Formula
        • Nested Queries
        • Query
        • Variable
      • Interactions
        • CRUD from Record Variable
        • Download
        • Execute Flow
        • Navigate
        • On Load
        • Open Alert Modal
        • Open Confirm
        • Open Dynamic Component Dialog
        • Open Dynamic Component Panel
        • Open Flow Panel
        • Open Flow Dialog
        • Show Toast
    • Advanced Topics
      • Undo / Redo
      • Copy and Paste
      • Keyboard Shortcut
  • Components
    • Explore All Components
    • Accordion
    • Alert
    • Audio Player
    • Avatar
    • Avatar Group
    • Badge
    • Barcode
    • Blockquote
    • Button
    • Button Group
    • Button Icon
    • Button Menu
    • Button Stateful
    • Calendar
    • Camera 🆕
    • Card
    • Carousel
    • Chart
    • Checkbox
    • Checkbox Button
    • Chip Container
    • Color Picker
    • Columns
    • Combobox
    • Container
    • Counter
    • Data LWC Container
    • Data Table
    • Date Picker
    • Date
    • Date Range
    • Dual Listbox
    • Dynamic Component
    • Formatted Address
    • Formatted Name
    • Formatted Value
    • Header
    • Icon
    • Icon Picker
    • Illustration
    • Image
    • Input Color
    • Input Date
    • Input Pen (Signature)
    • Input Text
    • Kanban
    • List
    • LWC Container
    • Map
    • Media Object
    • Metric
    • PDF Viewer
    • Pivot Table
    • Progress Bar
    • Progress Circle
    • Progress Indicator
    • Rating
    • Record Detail
    • Relationship Graph
    • Scope Notification
    • Section
    • Separator
    • Slider
    • Status
    • Tabbed Container
    • Tabs
    • Text
    • Text Area
    • Timeline
    • Toggle
    • Tree
    • Vertical Visual Picker
    • Video Player
    • Visual Picker
    • Visual Picker Link
  • Help
    • Contact Support
    • Security
    • Performance Guide
    • Deployment Process
    • Release Notes
    • Report Bugs
Powered by GitBook
LogoLogo

Company

  • About Us
  • Pricing

Policies

  • Privacy Policy
  • Terms of Service
On this page
  • Setting Up Your Data Table
  • Choose Your Data Source
  • Define Columns and Map Data
  • Enable Inline Editing (Optional)
  • Add Row Actions (Optional)
  • Group Data (Optional)
  • Other Settings
  • General Properties
  • Mobile Responsiveness
  • Header
  • Columns Widths
  • Column Sorting
  • Pagination
  • Pill Container
  • Filter Data
  • How to add Filters
  • Filtering on Non-Visible Data
  • Accessing the Filtering Menu
  • Customize the Filter Panel
  • Search
  • Making a field searchable
  • Searching on Non-Visible Data
  • Set a default search value
  • Interactions
  • Header Actions (Table-Wide Actions)
  • Row Actions (Record-Specific Actions)
  • Saving Changes (Save Action)
  • Canceling Changes (Cancel Action)

Was this helpful?

  1. Components

Data Table

The Avonni Data Table component allows you to display collections of data in a structured and organized table format.

Last updated 1 month ago

Was this helpful?

Setting Up Your Data Table

Choose Your Data Source

The first step is to tell the Data Table where to pull its data.

Here are your options:

Define Columns and Map Data

Once your data source is connected, you must define which fields will be displayed as columns and how they are configured.

Adding and Configuring Columns:

  1. Add Column: Click the "Add Column" button to create a new column. Repeat for each field you want to display.

  2. Map Data Fields:

    • Source Field: Select the field from your chosen data source (Manual, Variable, or Query) that will populate this column.

    • Column Label (Optional): Provide a user-friendly name for the column header. If left blank, the system may use the field name or label.

    • Data Type: The Data Table will usually auto-detect the data type (Text, Number, Date, etc.). You can often override this if needed (e.g., to display a number as currency).

  3. Customize Column Settings: Adjust these settings as needed:

    • Filterable: Allow users to filter the table based on this column.

    • Editable: Allow users to modify data directly in this column's cells. Important: See the "Enable Inline Editing" section below for details on saving edits.

    • Searchable: Include this column in table-wide searches.

    • Sortable: Allow users to sort the table by this column.

    • Width: Specify a fixed or percentage-based width for the column.

    • Alignment: Control text alignment (left, center, right).

    • Other Options: Explore additional column settings in the Data Table documentation for advanced customization.

  4. Reorder Columns (Optional): Drag and drop columns within the configuration area to change display order.

Enable Inline Editing (Optional)

Allow users to edit data directly within the table cells.

Inline Editing Options

  • Pencil Icon: Enabling the "Editable" setting on a column will display a pencil icon. Users click this to edit the cell's value.

  • Direct Cell Editing ("Display as Input"): For a more streamlined experience, choose the "Display as Input" option. This makes cells editable without requiring an extra click.

Saving Inline Edits

Important

Enabling inline editing does not automatically save changes. You must configure an "On Save" interaction:

  1. Add Interaction: In the Interaction tab, add an "On Save" interaction.

  2. Action Type: Choose "Update Records" to save the underlying Salesforce data changes.

Tutorial 👇

Add Row Actions (Optional)

Provide quick access to actions related to individual records in the table.

Creating Row Actions:

  • Create an Action Column: Add a new column to your table, and set its Type to "action". This is essential for creating row actions.

  • Define Action Labels: Within the action column's settings, add your desired actions (e.g., "Edit," "Delete," "View Details"). These labels will appear in a dropdown menu on each row.

Configuring Row Action Functionality:

Group Data (Optional)

Organize data into categories for more straightforward analysis and understanding.

Setting Up Grouping:

  • Grouping Column: Choose a column to group by in the Data Mappings section (e.g., "Status," "Region," "Owner").

Customizing Group Display

  • Display Options:

    • Hide Undefined Labels: Control the display of empty grouping values.

    • Collapse Groups: Initially collapse groups to save space.

    • Show Row Counts: Display the number of records within each group.

  • Group Order: Set the sorting order for groups (default, ascending, descending, or custom).

  • Linkify Values: (For lookup fields) Make group header values clickable, navigating the user to the related record


Other Settings

General Properties

Setting
Description

Hide Table Header

Hides the table header when enabled

Wrap Table Header

Long column headers automatically wrap up to 3 lines, preventing clipped text and improving readability

Hide Checkbox Column

Removes the checkbox column used for row selection

Show Row Number Column

Displays row numbers in the first column if enabled. NOTE: The Avonni Data Table uses Salesforce's standard Data Table as its foundation. Because of this, if you turn on "inline editing" (allowing users to edit data directly in the table), row numbers will automatically appear. This is how Salesforce has designed it, and we can't change that behavior.

Max Row Selection

Sets the maximum number of rows that can be selected.

Suppress Bottom Bar

Hides the footer with Save and Cancel buttons during inline editing.

Show Number of Items Selected

Displays the count of selected items if enabled.

Read Only

Prevents editing of records, making the table read-only

directly support pre-selecting rows using record IDsImportant Note on Row Pre-selection

The Avonni Data Table, like Salesforce's lightning-datatable, does not directly support pre-selecting rows using record IDs. Row selection is managed through:

  1. Data: The data provided to the table.

  2. User Interaction: Clicks within the table.

You cannot programmatically select rows by ID via a built-in property. Instead, row selection is a consequence of the data displayed and direct user actions.

Mobile Responsiveness

The Avonni Data Table is built on Salesforce's Lightning Data Table. The Lightning Data Table has limited responsiveness and may not automatically adjust to smaller screens. To optimize the Data Table for mobile devices, consider these options:

  • Create a separate Data Table for mobile: Build a simplified one with fewer columns specifically designed for mobile users. Use Salesforce's component visibility settings to display this mobile-friendly table only on smaller screens.


Header

The header is the top row of your Data Table. Use the Header section to customize its appearance and add functionality.

Header Options

  • displayedTitle: Give your Data Table a clear and descriptive title. This helps users understand the table's content at a glance.

  • Caption: Add a short description or extra information below the title to provide context or details about the data.

  • Icon: Include an icon in the header to make it more visually appealing or to represent the table's purpose.

  • Is Joined: This option removes the bottom border of the header, making it blend seamlessly with the rest of the table or other components.

  • Actions: Add buttons to your header to give users quick access to everyday actions, like creating a new record or exporting data. You can customize these actions in the "Interaction" tab.

  • Visible Actions: Control how many action buttons are shown directly in the header. The rest will be placed in a dropdown menu if you have more actions than you want to show. For example, if you have 4 actions but set "Visible Actions" to 2, only the first 2 buttons will be displayed directly.

  • Hide Actions: Completely hide the action menu in the header.

  • Disable Actions: Make the action menu inactive (grayed out) but still visible in the header


Columns Widths

Column widths can be customized if needed. By default, all columns have min and Max values set in pixels.

Setting
Description
Details & Options

Column Widths Mode

Specifies how column widths are calculated.

- Fixed: Equal widths for all columns. - Auto: Widths based on content and table width. Default is 'fixed'.

Max Column Width

Sets the maximum width for all columns.

Prevents columns from becoming too wide.

Min Column Width

Establishes the minimum width for all columns.

Ensures columns don’t become too narrow, affecting readability.

Wrap Text Max Lines

Specifies the max number of lines before truncating the content.

Content is cut off and shown with an ellipsis after the set number of lines. Must be 1 or more.

Resize Column Disabled

Disables manual column resizing.

Helpful in maintaining consistent column widths.

Resize Step

Width adjustment amount when resizing columns with arrow keys.

Allows for fine-tuned column width adjustments.

SET COLUMN WIDTH INDIVIDUALLY

Column width can be set individually for each column as follows:

  • Go to the Data Mappings section

  • Click on a column

  • Scroll down entirely and click on "Advanced Option"

  • Set a specific fixed width for this column.


Column Sorting

You can set the sorting options for columns. The default sorting direction is applied to sorted columns.

Each column can be sortable by activating the sortable toggle directly from the column properties.


Pagination

The Pagination section lets you activate Pagination for your datatable.

Here's how to add pagination on your datatable:

  • From the Properties Panel, expand the Pagination Options section

  • Check the "Show Pagination" toggle

  • Enter your desired number of items per page

  • Adjust other settings like:

    • Pagination alignment

    • Buttons icon and label.


Pill Container

Activating the Pill Container option will display selected items in a pill container. Pills can be sorted and displayed in a single line by activating the appropriate option.

The Label Field attribute displays the pill name by the selected field.

Final result

Setting
Description

Label Field

Determines the field name used for the pill label.

Sortable

Enables sorting within the pill container.

Single Line

Restricts the pill container to a single line.


Filter Data

The Avonni Data Table makes it easy for users to find the information they need by applying filters to the data. You have several options for setting up filters:

  • In Component Settings (Properties Panel): Customize filter settings within the component's properties.

  • Filtering on Non-Visible Data: You can even filter data based on columns that aren't visible in the table.

Each method gives you control over how users can refine their view of the data.

How to add Filters

From the Properties panel

  • Go to the Data Mappings section

  • Click on the column of the field you want to make searchable

  • Scroll down and toggle the Filterable attribute.

Filtering on Non-Visible Data

In the Data Mappings section, you can use specific fields as filters for other fields that aren't visible as columns. It allows you to add extra filters to your data without having to clutter your Data Table with additional columns.

How to Apply Field Filters in the Data Table Without Displaying the Fields

Filters Options

The Avonni Data Table offers three filtering options typ, each designed to accommodate different user preferences and screen sizes.

Filter Type
Description
Illustration

Horizontal

These filters appear directly above the data table, laid out in a horizontal row

Popover

This option allows filters to be hidden behind clickable icons or buttons; when clicked, a small, floating interfac appears, containing the filter options,

Side Panel

Filters in a side panel are located to the left or right of your data table, accessible through a panel that can be expanded or collapsed

Accessing the Filtering Menu

  • Select the Data Table

  • From the Properties panel, scroll down to the Filter section.

  • Select how you'd like to display filters.

Customize the Filter Panel

When configuring your Avonni Data Table component to use a "Panel" filter, you can present filtering options in a convenient side panel. This panel offers additional customization settings, described below:

  • Position (Left, Right):

    • This setting determines whether your filter panel slides out from the screen's left or right side when a user interacts with the filter.

  • Is Closed:

    • This option controls the initial state of the filter panel.

    • Set "Is Closed" to "True" if you want the filter panel to start hidden. This is useful when you initially want to emphasize the data table content.

    • Set "Is Closed" to "False" if you want the filter panel to be open by default, prompting users to customize their data view immediately.

  • Hide Toggle Button:

    • It indicates whether a toggle button is visible when manually opening and closing the filter panel.

    • Set "Hide Toggle Button" to "True" if you want the panel to open and close based on other events within your flow (e.g., when a filter icon is clicked).

    • Set "Hide Toggle Button" to "False" to give users an always-visible toggle button to control the panel.

Relevant Picklist Filters

The Avonni Data Table's picklist filters automatically adapt to your data. When filtering a picklist column, the filter menu only displays picklist values present in at least one row of the current table data. This avoids showing unused options and simplifies the filtering process.

Enable this by setting "Hide Picklist Empty Values" to "On" in the Data Table properties.


Search

The Search options let you configure your search box option. You can customize placeholder text and set the position of your search box. The Search box will appear when at least one field is searchable.

Things to Keep in Mind About Searchable Fields

Lookup Fields:

  • You can search lookup fields using the Query Data Source option. This means you can use the search box to find records based on the values in your lookup fields.

  • You cannot search lookup fields using the Variable Data Source option. However, we're working on adding this functionality soon!

Rich Text Fields:

  • You cannot search rich text fields using the Query Data Source option.

  • You can search rich text fields using the Variable Data Source option. This allows you to find records based on the content within your rich text fields.

Making a field searchable

From the Properties panel

  • Go to the Data Mappings section

  • Click on the column of the field you want to make searchable

  • Scroll down and toggle the Searchable attribute.

Searching on Non-Visible Data

This feature allows users to perform search queries on specific fields in the underlying dataset, even if they are not visible in the table view.

  • Select the Data Table

  • Open the Data Mappings section

  • In the Search Fields attribute, select the fields that must be searchable without displaying them in the Data Table.

Set a default search value

In the Search options, the 'defaultSearchValue' attribute lets you set a predefined search term in your tables. When the data table loads, it automatically searches using this specified term.


Interactions

You can configure various interactive elements within the Avonni Data Table to provide users with ways to interact with data:

Header Actions (Table-Wide Actions)

  • Purpose: Provide actions that operate on the entire data table or trigger general tasks.

  • Implementation: Add buttons or other interactive components to the data table's header area.

  • Examples: "Create New Record," "Export to CSV," "Bulk Update," "Apply Filter Preset."

Row Actions (Record-Specific Actions)

  • Purpose: Allow users to perform actions related to a specific record in the table.

  • Implementation: Add buttons or other interactive components to each data table row.

  • Examples: "Edit Record," "Delete Record," "View Record Details," "Approve/Reject," "Start Workflow."

Saving Changes (Save Action)

  • Purpose: To persist any edits made within the editable cells of the Data Table.

Canceling Changes (Cancel Action)

  • Purpose: Allow users to revert any unsaved edits and restore the table to its previous state.

  • Implementation: Configure a designated button or action to cancel pending changes

Interactions: You must define for each row action. For instance, clicking "Delete" should trigger an interaction that opens a confirmation flow.

Use the component: For a more responsive solution, consider using the Avonni List component. This component that adjust the display based on screen size. Combine this with Salesforce's component visibility settings to show the List only on mobile devices.

Tutorial:

Implementation: Configure a designated interaction to trigger the "," which commits the changes to the underlying data source.

How to make a field editable
interactions
Avonni List
has built-in responsive settings
How to Grayscale Header Actions Dynamically in Avonni Data Table
Page cover image

Manual

Enter data directly into the component configuration. This is suitable for small, static datasetsta.

Variable

Use a variable as your data source. This is useful for data that changes based on user interactions or other component logic.

Query

Fetch data directly from Salesforce using a query. This is the most common option for displaying Salesforce records.

Save Records Action