I am developing an app in Ionic 3.2 version. I have a ion-refresher inside ion-scroll. I want to disable scrolling of ion-content
and want to show the ion-refresher
inside the ion-scroll
when scroll the ion-list
. But it fails.
no-bounce
(<ion-content no-bounce>
) and disable-scroll
(<ion-content disable-scroll>
) but still content is scrolling ion-fixed
inside content
and inside a div
just below the content
. But then the ion-refresher
not working.scroll="false"
(like in ionic 1.0) but still scrollingBelow the code;
<ion-content scroll="false">
<ion-scroll scrollY="true" style="width: 100% !important;height:30% !important">
<ion-refresher (ionRefresh)="fill_data($event)">
<ion-refresher-content pullingIcon="arrow-dropdown" pullingText="{{ 'pull_to_refresh' | translate }}" refreshingSpinner="circles"
refreshingText="{{ 'refreshing' | translate }}">
</ion-refresher-content>
</ion-refresher>
<ion-list>
//data filling here
</ion-list>
</ion-scroll>
</ion-content>
Please help me...
Example 1 - Try a setting <content scroll="false"> that will disable scrolling. This every time an event is called, in our case, on every drag event.
Disabling scroll with only CSS. There's another way to disable scrolling that is commonly used when opening modals or scrollable floating elements. And it is simply by adding the CSS property overflow: hidden; on the element you want to prevent the scroll.
ion-scroll Scroll is a non-flexboxed scroll area that can scroll horizontally or vertically. ion-Scroll Can be used in places where you may not need a full page scroller, but a highly customized one, such as image scubber or comment scroller.
The Ionic framework provides an <ion-content> element that serves as a container which wraps all the other elements that we want to create in the app. The content component allows an easy to use content area that contains some useful methods to control the scrollable area.
This is how I did it just now - same problem as you @Tony
With this SCSS my list scrolls, and I can have items below it:
page-home {
.scroll-content {
overflow: hidden;
}
ion-list {
overflow-y: auto;
max-height: 72vh;
}
}
I tried using the ionic scroll
and other options but none seem to work right now.
.scroll-content {
overflow-y: hidden !important;
}
this worked for me
use in the sass file of the page ..it works for me
.scroll-content {
left: 0;
right: 0;
top: 0;
bottom: 0;
position: absolute;
z-index: 1;
display: block;
overflow-x: unset;
overflow-y: unset;
-webkit-overflow-scrolling: touch;
will-change: scroll-position;
contain: size style layout;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With