Skip to main content

Record List

Ant Design

The Record List component shows records as a list of rows, each with a title, details, a status tag and a value, such as users, customers or orders. Users click a row to select it.

Properties​

Property
Description
Expected Value
Data sourceRecords to list, one row each, such as the data from a query.Array
Title fieldField shown as each row's title.Text. Default: name
Avatar fieldField that holds an image URL or a name for the avatar. A name shows its initials.Text
Meta fieldsFields shown under the title, joined with a dot, such as ['email', 'role'].Array. Default: ["email", "role"]
Status fieldField shown as a status tag at the right. Common words such as Active, Pending or Overdue get matching colors.Text. Default: status
Progress fieldField with a percentage shown as a small progress bar under the title.Text
Value fieldField shown as a bold value at the right, such as an amount.Text
Value formatHow Value field is written. percent reads 0.25 as 25%, and compact shortens large numbers to 12K or 1.2M.auto, number, currency, percent, compact, date, datetime. Default: auto
CurrencyCurrency code, such as USD or EUR, used when Value format is currency.Text. Default: USD
LocaleLocale for number formatting, such as pt-BR. Leave it empty to follow the currency's usual format.Text
Status colorsColors for status values, such as { "Invited": "blue", "Suspended": "red" }. They override the automatic colors.Object
Id fieldField that identifies each record. It's read into selectedItemId.Text. Default: id
Show avatarShows the avatar when Avatar field is set.On or off. Default: On
Avatar shapeShape of the avatars.circle, square. Default: circle
SizeSpacing of the rows.small, default, large. Default: default
SplitDraws a divider line between rows.On or off. Default: On
BorderedDraws a border around the list.On or off. Default: On
Empty textText shown when there are no records.Text. Default: No records

Additional Actions​

Each of these can be switched on or off, or set with a logical expression by clicking fx.

Property
Description
Expected Value
VisibilityShows or hides the component. Hidden components keep their space unless Collapse when hidden is on.On or off. Default: On
Collapse when hiddenRemoves the hidden component's space, so the components below it move up.On or off. Default: Off
Loading stateShows the component's loading look and blocks interaction, for example while a query runs.On or off. Default: Off
DisableStops the user from interacting with the component.On or off. Default: Off
Dynamic heightLets the component grow with its content in the running app instead of keeping a fixed height.On or off. Default: Off

Devices​

Property
Description
Expected Value
Show on desktopShows the component in the desktop layout.On or off. Default: On
Show on mobileShows the component in the mobile layout.On or off. Default: Off

Events​

Add a handler from the Events section of the properties panel. See Event Triggers for the steps.

Event
Description
On item clickedTriggers when the user clicks a row to select it. Clicking the selected row again clears the selection without triggering the event.

Component Specific Actions (CSA)​

Run these from an event handler with Control Component, or from a RunJS query. See Component Specific Actions.

Action
Description
How To Access
Clear selectionClears the selected row.components.recordlist1.clearSelection()
Set visibilityShows the component when true, hides it when false.components.recordlist1.setVisibility(false)
Set disableDisables the component when true, enables it when false.components.recordlist1.setDisable(false)
Set loadingTurns the loading state on with true, off with false.components.recordlist1.setLoading(false)

Exposed Variables​

Variable
Description
How To Access
dataSourceRecords to list, one row each, such as the data from a query.{{components.recordlist1.dataSource}}
titleFieldField shown as each row's title.{{components.recordlist1.titleField}}
avatarFieldField that holds an image URL or a name for the avatar. A name shows its initials.{{components.recordlist1.avatarField}}
metaFieldsFields shown under the title, joined with a dot, such as ['email', 'role'].{{components.recordlist1.metaFields}}
statusFieldField shown as a status tag at the right. Common words such as Active, Pending or Overdue get matching colors.{{components.recordlist1.statusField}}
progressFieldField with a percentage shown as a small progress bar under the title.{{components.recordlist1.progressField}}
valueFieldField shown as a bold value at the right, such as an amount.{{components.recordlist1.valueField}}
valueFormatHow Value field is written. percent reads 0.25 as 25%, and compact shortens large numbers to 12K or 1.2M.{{components.recordlist1.valueFormat}}
currencyCurrency code, such as USD or EUR, used when Value format is currency.{{components.recordlist1.currency}}
localeLocale for number formatting, such as pt-BR. Leave it empty to follow the currency's usual format.{{components.recordlist1.locale}}
statusColorsColors for status values, such as { "Invited": "blue", "Suspended": "red" }. They override the automatic colors.{{components.recordlist1.statusColors}}
idFieldField that identifies each record. It's read into selectedItemId.{{components.recordlist1.idField}}
showAvatarShows the avatar when Avatar field is set.{{components.recordlist1.showAvatar}}
avatarShapeShape of the avatars.{{components.recordlist1.avatarShape}}
sizeSpacing of the rows.{{components.recordlist1.size}}
splitDraws a divider line between rows.{{components.recordlist1.split}}
borderedDraws a border around the list.{{components.recordlist1.bordered}}
emptyTextText shown when there are no records.{{components.recordlist1.emptyText}}
selectedItemIdValue of Id field in the item the user clicked, or empty when nothing is selected.{{components.recordlist1.selectedItemId}}
selectedItemThe full data row of the item the user clicked, or {} when nothing is selected.{{components.recordlist1.selectedItem}}
selectedItemIndexPosition of the clicked item in Data source, counting from 0, or -1 when nothing is selected.{{components.recordlist1.selectedItemIndex}}
isVisibleWhether the component is visible.{{components.recordlist1.isVisible}}
isLoadingWhether the component is in its loading state.{{components.recordlist1.isLoading}}
isDisabledWhether the component is disabled.{{components.recordlist1.isDisabled}}

Styles​

Style
Default
Primary colorTheme: Brand primary
Text colorTheme: Primary text
Container backgroundTheme: Surface 1
Border colorTheme: Default border
Border radius—
Box shadow0px 0px 0px 0px #00000040

A default that starts with Theme: follows the app's theme until the style is set to another value. See App Themes.