Skip to content

Commit 92cba2a

Browse files
committed
Merge branch 'dev' of github.com:quasarframework/quasar into dev
2 parents 62f6f48 + 057f0cd commit 92cba2a

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

dev/components/components/infinite-scroll.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
<div>
33
<div class="layout-padding">
44
<p class="caption">Scroll down to see it in action.</p>
5+
<q-toggle v-model="active" label="Active" />
56

67
<br>
7-
<q-infinite-scroll :handler="refresher">
8-
<div v-for="(item, index) in items" class="caption">
8+
<q-infinite-scroll :handler="refresher" v-if="active">
9+
<div v-for="(item, index) in items" :key="index" class="caption">
910
<q-chip square color="secondary" class="shadow-1">
1011
{{ index + 1 }}
1112
</q-chip>
@@ -16,6 +17,7 @@
1617
<q-spinner name="dots" slot="message" :size="40"/>
1718
</div>
1819
</q-infinite-scroll>
20+
<div v-else style="height: 300vh">Placeholder for scroll</div>
1921
</div>
2022
</div>
2123
</template>
@@ -24,7 +26,8 @@
2426
export default {
2527
data () {
2628
return {
27-
items: [{}, {}, {}, {}, {}]
29+
items: [{}, {}, {}, {}, {}],
30+
active: true
2831
}
2932
},
3033
methods: {
@@ -37,6 +40,7 @@ export default {
3740
}
3841
3942
this.items = this.items.concat(items)
43+
console.log('refresh')
4044
done()
4145
}, 2500)
4246
}

src/components/infinite-scroll/QInfiniteScroll.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ export default {
6060
this.index = 0
6161
},
6262
resume () {
63-
this.working = true
64-
this.scrollContainer.addEventListener('scroll', this.poll, listenOpts.passive)
63+
if (this.working !== true) {
64+
this.working = true
65+
this.scrollContainer.addEventListener('scroll', this.poll, listenOpts.passive)
66+
}
6567
this.immediatePoll()
6668
},
6769
stop () {
@@ -75,13 +77,14 @@ export default {
7577
this.element = this.$refs.content
7678

7779
this.scrollContainer = this.inline ? this.$el : getScrollTarget(this.$el)
78-
if (this.working) {
79-
this.scrollContainer.addEventListener('scroll', this.poll, listenOpts.passive)
80-
}
8180

8281
this.poll()
8382
this.immediatePoll = this.poll
8483
this.poll = debounce(this.poll, 50)
84+
85+
if (this.working === true) {
86+
this.scrollContainer.addEventListener('scroll', this.poll, listenOpts.passive)
87+
}
8588
})
8689
},
8790
beforeDestroy () {

src/components/select/QSelect.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ export default {
3636
chipsColor: String,
3737
chipsBgColor: String,
3838
displayValue: String,
39-
popupMaxHeight: String
39+
popupMaxHeight: String,
40+
popupCover: {
41+
type: Boolean,
42+
default: true
43+
}
4044
},
4145
data () {
4246
return {
@@ -351,7 +355,7 @@ export default {
351355
staticClass: 'column no-wrap',
352356
'class': this.dark ? 'bg-dark' : null,
353357
props: {
354-
cover: true,
358+
cover: this.popupCover,
355359
keepOnScreen: true,
356360
disable: !this.editable,
357361
anchorClick: false,

0 commit comments

Comments
 (0)