ui-pager icon indicating copy to clipboard operation
ui-pager copied to clipboard

Using Observable Array in Pager

Open liamcharmer opened this issue 3 years ago • 1 comments

NativeScript Vue

I have an Observable Array containing objects as each item.

I pass the Observable Array as a Prop into the component.

When I try to iterate through the Observable Array in the Pager, it does not work. I created an empty array in the data, and then push each observable array and it works. However ideally would like the Observable array being passed in from the prop to work.

<template>
 <Pager
      height="75%"
      width="100%"
      backgroundColor="yellow"
      :showIndicator="true"
      for="item in items"
    >
      <v-template>
        <Label :text="item" />
      </v-template>
      </template>
<script>
import { ObservableArray } from '@nativescript/core';
export default {
  props: {
    items: {
      type: ObservableArray,
      default: null,
      required: true,
    },
}
}

liamcharmer avatar Jul 16 '22 11:07 liamcharmer

@liamcharmer did you ever manage to get it to work?

dangrima90 avatar Apr 05 '23 08:04 dangrima90