nativescript-pulltorefresh icon indicating copy to clipboard operation
nativescript-pulltorefresh copied to clipboard

Vue PullToRefresh Docs

Open nabilcreates opened this issue 7 years ago • 2 comments

In my experience, i think this docs is more usefull, this is because

  • not everyone would use their parent view as PullToRefresh
  • I encountered errors while trying to use it

I found the solution and maybe you can test (and obviously update the docs :100: )

Basically main idea is to wrap PullToRefresh with StackLayout

<template>
    <Page>
        <ActionBar title="App's ActionBar" class="action-bar" />

        <StackLayout>
            <PullToRefresh @refresh="refreshList">
                <ListView class="list-group" for="item in items" @itemTap="itemTap">
                    <v-template>
                        <StackLayout class="list-group-item">

                           // CODE HERE

                        </StackLayout>
                    </v-template>
                </ListView>
            </PullToRefresh>

        </StackLayout>
            

    </Page>
</template>

nabilcreates avatar Nov 06 '18 05:11 nabilcreates

In my experience, i think this example below is more useful, this is because*

nabilcreates avatar Nov 06 '18 05:11 nabilcreates

Why not use it as the parent though? Any reason you wouldn't do that in Vue?

The PullToRefresh extends ContentView here which is the base class for the layout containers in NS so having the parent be a StackLayout shouldn't provide any additional benefit. I could be wrong though with the vue integration 😀 so let me know what you think.

bradmartin avatar Nov 06 '18 15:11 bradmartin