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

Not working within a dialog #131

Open
Torone opened this issue Sep 24, 2019 · 7 comments
Open

Not working within a dialog #131

Torone opened this issue Sep 24, 2019 · 7 comments

Comments

@Torone
Copy link

Torone commented Sep 24, 2019

I'm using Vuetify dialogs and within I have a big list of data I wish to load with infinite scroll.
The plugin is working fine outside a dialog but it doesn't fetch in a dialog...

<v-dialog v-model="myDialog">
   <template v-slot:activator="{ on }">
      <button
        @click="openDialog()"
        v-on="on"
      >
         Open
      </button>
   </template>
   <div
      v-infinite-scroll="loadMoreItems"
      :infinite-scroll-disabled="autoLoadDisabled"
      :infinite-scroll-distance="10"
    >
      <div
        v-for="(item, i) in items"
        :key="i"
      >
         {{ item }}
      </div>
   </div>
</v-dialog>

The method loadMoreItems is not called once the dialog reach the very bottom.
Moving the HTML outside the dialog it works as expected.

Is there a trick to let it work within the dialog?

@syymo
Copy link

syymo commented Sep 29, 2019

Me too.

@d2phap
Copy link

d2phap commented Feb 14, 2020

any update?

@wkl007
Copy link

wkl007 commented May 27, 2020

VDialog.vue

<v-dialog v-model="myDialog">
   <template v-slot:activator="{ on }">
      <button
        @click="openDialog()"
        v-on="on"
      >
         Open
      </button>
   </template>
   <infinite-scroll/>
</v-dialog>

InfiniteScroll.vue

<div
  v-infinite-scroll="loadMoreItems"
  :infinite-scroll-disabled="autoLoadDisabled"
  :infinite-scroll-distance="10"
>
  <div
    v-for="(item, i) in items"
    :key="i"
  >
    {{ item }}
  </div>
</div>

It's work for me !!!

@dudv82
Copy link

dudv82 commented Dec 1, 2020

VDialog.vue

<v-dialog v-model="myDialog">
   <template v-slot:activator="{ on }">
      <button
        @click="openDialog()"
        v-on="on"
      >
         Open
      </button>
   </template>
   <infinite-scroll/>
</v-dialog>

InfiniteScroll.vue

<div
  v-infinite-scroll="loadMoreItems"
  :infinite-scroll-disabled="autoLoadDisabled"
  :infinite-scroll-distance="10"
>
  <div
    v-for="(item, i) in items"
    :key="i"
  >
    {{ item }}
  </div>
</div>

It's work for me !!!

Thank you. I followed and the error was fixed

@yuetingsui
Copy link

VDialog.vue

< v-dialog  v-model = " myDialog " > 
   <模板 v-slot : activator = " { on } " > 
      < button 
        @ click = " openDialog () "
         v-on = " on " 
      >
         打开
      </ button > 
   < /模板> 
   <无限滚动/> 
</ v-dialog >

InfiniteScroll.vue

< div 
  v-infinite-scroll = " loadMoreItems " 
  : infinite-scroll-disabled = " autoLoadDisabled " 
  : infinite-scroll-distance = " 10 " 
> 
  < div 
    v-for = " (item, i) in items " 
    : key = " i " 
  > 
    {{ item }} 
  </ div > 
</ div >

这对我有用!!!

很好用!

@jesselpereira
Copy link

jesselpereira commented Jun 15, 2023

VDialog.vue

<v-dialog v-model="myDialog">
   <template v-slot:activator="{ on }">
      <button
        @click="openDialog()"
        v-on="on"
      >
         Open
      </button>
   </template>
   <infinite-scroll/>
</v-dialog>

InfiniteScroll.vue

<div
  v-infinite-scroll="loadMoreItems"
  :infinite-scroll-disabled="autoLoadDisabled"
  :infinite-scroll-distance="10"
>
  <div
    v-for="(item, i) in items"
    :key="i"
  >
    {{ item }}
  </div>
</div>

It's work for me !!!

Thank you dude, I've been trying to figure this out for weeks.

@17862974826
Copy link

17862974826 commented Jun 15, 2023 via email

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

8 participants