Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49161

Ionic 5 How to make popover width dynamic

$
0
0

CSS Custom properties for ion-popover like min-width and max-width do not work.

If a popover contains a list of menu items then its width should adapt the width of the lengthiest menu item but should not exceed the set max-width.

For example,

–min-width: 240px;
–max-width: 320px;

The above values should behave like:
If the lengthiest menu item width > max-width then limit the width to max-width.
If the lengthiest menu item width > min-width and < max-width then limit the width to menu width.

But this does not work in Ionic 5 Angular app (platform ios).
Setting --width: auto; does not work.

Any idea how to achieve this?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49161

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>