nstudio / nativescript-pulltorefresh

:recycle: NativeScript plugin for PullToRefresh controls
Other
144 stars 27 forks source link

Vue PullToRefresh Docs #48

Open nabilcreates opened 6 years ago

nabilcreates commented 6 years ago

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

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 commented 6 years ago

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

bradmartin commented 6 years ago

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.