1

can we change the dropdown box align with combobox? is it possible?

it is like this now. enter image description here

I want it like this enter image description here

<td class="slds-cell_action-mode" role="gridcell">
                                             <div class="slds-truncate" title="MarketOptions">
                                                 <lightning-combobox
                                                     class="combostyle"
                                                     name={item.id}
                                                     label="Options"
                                                     value={item.selectedOption}
                                                     options={lst}
                                                     onchange={handlePicklistChange}
                                                     placeholder="Select Market"
                                                     variant="label-hidden">
                                                 </lightning-combobox>
                                             </div>
                                         </td>

1 Answer 1

1

For lightning-combobox, we can control dropdown alignment using dropdown-alignment attribute as shown below :

<lightning-combobox
            name="progress"
            label="Status"
            value=""
            placeholder="Select Progress"
            options={options}
            onchange={handleChange}
            dropdown-alignment="left"
            variant="label-hidden"
    ></lightning-combobox>

Default value for dropdown-alignment attribute is left, not sure why its showing to the right.

For responsive design , use auto as dropdown-alignment

More info - https://developer.salesforce.com/docs/component-library/bundle/lightning-combobox/specification

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .