Revel
GitHub
GitHub
  • Overview

    • Getting started
    • FAQ
    • Release notes
  • Foundations

    • Meet the standard
    • Accessibility
    • Internationalization
    • Information hierarchy
    • Speed
  • Design

    • Visual principles
    • Colors
    • Space
    • Icons
    • Typography
  • Design tokens
  • Style helpers
  • Content

    • Express your ideas
    • Actionable language
    • Inclusive and accessible language
    • Alternative text
    • Grammar and mechanics
      • Basics
      • Capitalization
      • Dates and units of measurement
      • Punctuation
  • Components

    • Alert
    • Avatar
    • Badge
    • Button
    • Button group
    • Checkbox
    • Date Input
      • dates
      • datetimes
      • ranges
    • Field group
    • File upload
    • Flex
    • Grid
    • Icon
    • Image
    • Input
    • Loader
    • Modal
    • Month picker
    • Pagination
    • Popper
    • Radio
    • Repeater
    • Select
    • Tabs
    • Tile
    • Toast
    • Toggle
  • Directives

    • Click outside
    • Tooltip

Repeater

The r-repeater is an abstract component for rendering tabular data with ease and flexibility in your applications.

Usage

import { RRepeater } from "@rebilly/revel";

<r-repeater :provider="[{id: 1, name: 'John'}]">
    <template #headers>
      <th>ID</th>
      <th>Name</th>
    </template>
    <template #default="{ item }">
      <tr>
        <td>{{ item.id }}</td>
        <td>{{ item.name }}</td>
      </tr>
    </template>
</r-repeater>

Example

repeater-simple.vue

API

Props

NameTypeDefaultDescription
providerunion, Array, TSParenthesizedType, Promise

Returns some data to be rendered by the default scoped slot

isLoaderFullscreenbooleantrue

Defines if the loading state is fullscreen

isLoaderSpinnerbooleanfalse

Defines if the loading is displayed as a spinner

watcherobject() => ({})

Defines the property, which changes will trigger the fetching of data

Slots

NameDescription
colgroup

Content for colgroups - see HTML <colgroup>

thead

Content for thead - see HTML <thead>

headers

Specify the <th> of your table, rather than the whole thead

default

Content for tr - see HTML <tr>

empty

Empty state (if the provider function returns no data)

Edit this page
Last Updated: 7/25/24, 7:09 PM
Contributors: Cesar Level, John Hannagan, Weetbix
Prev
Radio
Next
Select