[Q-Select] Dropdown width for long option items #12617
-
|
Is there a way to make the width of the dropdown for long option items be the same as the width of the q-select itself without having to hard code a max-width? The second example in the image is what I'm trying to achieve without having to hard code a value for max-width of the drop down items: Here's the codepen I used to create the screenshot. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
|
No, sorry |
Beta Was this translation helpful? Give feedback.
-
|
You can do something like this. |
Beta Was this translation helpful? Give feedback.
-
|
use https://quasar.dev/vue-components/resize-observer#introduction |
Beta Was this translation helpful? Give feedback.
-
|
Not sure if this was mentioned already. I think I found a simpler solution. It looks like quasar sets min-width and max-width on the displayed dropdown. The min-width seems to always fit the width of the form field which this dropdown belongs to. If you use the then you'll also achieve the same result as with resize observers. Please let me know if that works for you too :) |
Beta Was this translation helpful? Give feedback.



use https://quasar.dev/vue-components/resize-observer#introduction
https://codepen.io/metalsadman/pen/PoOvqBB?editors=1010