question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: ion-select cannot handle long lists with a visible scrollbar for web users (alert view, Ionic 4.4.2)

See original GitHub issue

With Ionic 4.4.2, the ion-select component (with default alert interface) cannot be configured or styled to show a scrollbar for larger lists of more than 8 or so items. This makes the component unusable on larger lists where web-based users need scrollbars.

For lists of 10 to 20 items, there are temporary workarounds for changing the alert-wrapper max-height and adjusting the inner alert button height, but for larger 20+ lists, there doesn’t seem to be any way to force a scrollbar on the inner content section of the alert (e.g. overflow-y: scroll on the alert-wrapper class).

After a lot of troubleshooting, it was easier to switch over to a plain select component for the larger. If this can’t be easily fixed, then to support future CSS styling, it would be useful if there were an inner div inside of alert-wrapper, and if alert-wrapper could be set to overflow-y:scroll. There is something preventing overflow-y:scroll !important from taking effect on alert-wrapper, even in Chrome dev tools… maybe someone with more flex experience has a solution.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

14reactions
klemenszcommented, Oct 4, 2019

We are now using this workaround (in global.scss):

/*
 * This adds a scroll bar to ionic alerts
 */
.alert-radio-group::-webkit-scrollbar, .alert-checkbox-group::-webkit-scrollbar {
    width: 0.7em;
    display: block !important;
}

.alert-radio-group::-webkit-scrollbar-track, .alert-checkbox-group::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
    box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
}

.alert-radio-group::-webkit-scrollbar-thumb, .alert-checkbox-group::-webkit-scrollbar-thumb {
    background-color: darkgrey;
    outline: 1px solid slategrey;
}
2reactions
czzplnmcommented, Feb 24, 2021

Will this be fixed anytime soon? Its been almost 2 years!

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: ion-select cannot handle long lists with a visible scrollbar ...
With Ionic 4.4.2, the ion-select component (with default alert interface) cannot be configured or styled to show a scrollbar for larger ...
Read more >
Ionic 4 - ion-select does not scroll to selected item in alert
I created this stackblitz to highlight the behaviour, we can see on the stackblitz that on loading the view, the selected value is...
Read more >
@ionic/angular | Yarn - Package Manager
Ionic is an open source app development toolkit for building modern, fast, top-quality cross-platform native and Progressive Web Apps from a single codebase ......
Read more >
Scroll Bar Not Coming On Ionic Popover - ADocLib
With Ionic 4.4.2 the ionselect component with default alert interface cannot be configured or styled to show a scrollbar for larger lists of...
Read more >
Second alert design issue in device ionic-v4
when first one injected then second design not working and vice versa. so we cant use both mode in a page. btw why...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found