List Index Vue Component

List Index Vue component represents List Index component.

List Index Components

There are following components included:

  • f7-list-index

List Index Properties

Prop Type Default Description
<f7-list-index> properties
init boolean true Initializes List Index
list-el object
string
Related List View element. HTMLElement or string with CSS selector of List View element
indexes array
string
auto Array with indexes. If not passed then it will automatically generate it based on item-divider and list-group-title elements inside of passed List View element in listEl parameter
scroll-list boolean true Will automatically scroll related List View to the selected index
label boolean false Enables label bubble with selected index when you swipe over list index
ios-item-height number 14 Single index item height. It is required to calculate dynamic index and how many indexes fit on the screen. For iOS theme
md-item-height number 14 Single index item height. It is required to calculate dynamic index and how many indexes fit on the screen. For MD theme

List Index Events

Event Arguments Description
<f7-list-index> events
listindex:select (itemContent) Event will be triggered on index select rather by click or swiping. As an argument event handler receives selected index item content

List Index Methods

Event Description
<f7-list-index> methods
.update() Recalculates indexes, sizes and rerenders list index
.scrollToList(itemContent) Scrolls related list to specified index content

Examples

Example of full page with list index build for contacts list

<f7-page>
  <f7-navbar title="List Index" back-link="Back"></f7-navbar>

  <!-- List Index -->
  <f7-list-index
    indexes="auto"
    list-el="#contacts-list"
    :scroll-list="true"
    :label="true"
    @listindex:select="onIndexSelect"
  ></f7-list-index>

  <!-- Contacts list -->
  <f7-list contacts-list id="contacts-list">
    <f7-list-group>
      <f7-list-item title="A" group-title></f7-list-item>
      <f7-list-item title="Aaron"></f7-list-item>
      <f7-list-item title="Adam"></f7-list-item>
      <f7-list-item title="Aiden"></f7-list-item>
      ...
    </f7-list-group>
    <f7-list-group>
      <f7-list-item title="B" group-title></f7-list-item>
      <f7-list-item title="Benjamin"></f7-list-item>
      <f7-list-item title="Blake"></f7-list-item>
      <f7-list-item title="Bobby"></f7-list-item>
    </f7-list-group>
    <f7-list-group>
      <f7-list-item title="C" group-title></f7-list-item>
      <f7-list-item title="Caleb"></f7-list-item>
      <f7-list-item title="Callum"></f7-list-item>
      <f7-list-item title="Cameron"></f7-list-item>
      ...
    </f7-list-group>
    ...
    <f7-list-group>
      <f7-list-item title="Z" group-title></f7-list-item>
      <f7-list-item title="Zachary"></f7-list-item>
    </f7-list-group>
  </f7-list>
</f7-page>