function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Yuvaraj PalaniYuvaraj Palani 

LWC - Need help on changing <lightning-combox> dropdown size

Hello, 

I'm using Lighting combox on LWC modal and the picklist values are going away from the modal. 
I want to restrict the Dropdown size according to the modal content component. 
 
<lightning-combobox name="Month" label="Month" data-attribute="month" class="dropdownsize validValue"
                                    value={cardDetails.expiryMonth} placeholder="Month" options={Months}
                                    dropdown-alignment="bottom-left" required></lightning-combobox>
User-added image

when I inspect this component in this browser, I could see it defaults to size 10 using the slds class .slds-dropdown_length-with-icon-10

I tried to override this slds class in my component, but it didn't work due to shallow DOM restriction. 

If I could atleast change the dropdown size to "5", that should be ok for now. 

If anyone has any ideas , please let me know. 
Danish HodaDanish Hoda
Hi Yuvaraj,
You cannot override th shadow DOM elements in LWC, try using HTML Select for the dropdown here.