just a quick question. I'm developing an app with Ionic 3.20.0. Everything is working fine except this tiny little issue with the scrollbars.
For starters I have set overflow:hidden;
on my ion-content
in my app.scss
file and it does exactly what it should: not scroll the content which includes my ion-card
.
Inside my ion-card
i have two sections: one with fixed content (<div class="search-card">...</div>
) at the top and the second one is a list of rows that are scrollable(<div class="scroll"> ...</div>
).
which would look like this in code:
<ion-content class="no-scroll">
<ion-card>
<back-button></back-button>
<div class="search-card">
<ion-row class="heading-row" padding>
<ion-col col-12 class="heading-row" text-left>
<ion-searchbar placeholder="Nach Name / Firma suchen" debounce="500" showCancelButton="false" color="red" (ionInput)="searchbarInputChanges($event)"></ion-searchbar>
</ion-col>
</ion-row>
<ion-row class="overview-header no-scroll" padding-left>
<ion-col col-1>Status</ion-col>
<ion-col col-1>Anrede</ion-col>
<ion-col col-2>Nachname</ion-col>
<ion-col col-2>Vorname</ion-col>
<ion-col col-2>Unternehmen</ion-col>
<ion-col col-2> Telefon </ion-col>
<ion-col col-2>E-Mail</ion-col>
</ion-row>
</div>
<div class="scroll">
<ion-item *ngIf="!getClientCustomers()" text-center class="no-data-notification">
<ion-icon name="information-circle"></ion-icon><br> Zur Zeit sind noch keine Leads vorhanden.
</ion-item>
<div *ngIf="getClientCustomers()" >
<ion-row class="overview-content" align-items-center *ngFor="let clientCustomer of getClientCustomers()">
<ion-col col-1>
<span *ngIf="clientCustomer.applicant == 1">Interessent</span>
<span *ngIf="clientCustomer.applicant == 0">Kunde</span>
</ion-col>
<ion-col col-12 col-md-1>
<span *ngIf="clientCustomer.gender=='f'">Frau</span>
<span *ngIf="clientCustomer.gender=='m'">Herr</span>
</ion-col>
<ion-col col-12 col-md-2 class="lastname">
<a (click)="openLead(clientCustomer)">{{clientCustomer.lastname}}</a>
</ion-col>
<ion-col col-12 col-md-2>
<a (click)="openLead(clientCustomer)">{{clientCustomer.firstname}}</a>
</ion-col>
<ion-col col-12 col-md-2>{{clientCustomer.company}}</ion-col>
<ion-col col-2>{{clientCustomer.phone}}</ion-col>
<ion-col col-2>{{clientCustomer.email}}</ion-col>
</ion-row>
</div>
</div>
</ion-card>
</ion-content>
SCSS:
no-scroll .scroll-content {
overflow: hidden;
.scroll {
overflow-y: scroll!important;
height: 79%!important;
padding: 0 2%;
}
}
When opening the app on my tablet the scrolling works but the scrollbars are not showing. I need them to be visible since there are over 400 rows when my data is loaded and i need to see where i'm currently at inside the data.
I tried to set the overflow differently but to no avail. Has anyone a thought or solution for this? If you need more information please ask.
Thanks a lot