Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Observable Array in Pager #21

Open
liamcharmer opened this issue Jul 16, 2022 · 1 comment
Open

Using Observable Array in Pager #21

liamcharmer opened this issue Jul 16, 2022 · 1 comment

Comments

@liamcharmer
Copy link

liamcharmer commented Jul 16, 2022

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,
    },
}
}
@dangrima90
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants