You need to sign in to do that
Don't have an account?
sarthak nigam 3
I am trying to resize my duallist box with help of size option in lightning and it is not working
<lightning:dualListbox label="Some field" name="some name"
sourceLabel="Available"
selectedLabel="Chosen"
options="{!v.options}"
onchange="{!c.handleChange}"
size="20"
sourceLabel="Available"
selectedLabel="Chosen"
options="{!v.options}"
onchange="{!c.handleChange}"
size="20"
Your code only increases the length of duallistbox.
Try this:-
<lightning:dualListbox name="some name"
label= "Some field"
sourceLabel="Available"
selectedLabel="Chosen"
fieldLevelHelp="This is a dual listbox"
options="{!v.options}"
onchange="{! c.handleChange }"
min="{!v.min}"
max="{!v.max}"/>
Or you can try this:-
this code to the CSS Style in the Lightning Component:
.THIS .slds-dueling-list__column_responsive {
min-width: 45%;
}
.THIS .slds-dueling-list__column_responsive .slds-dueling-list__options {
min-width: 100%;
}
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
All Answers
https://developer.salesforce.com/forums/?id=9060G0000005WhcQAE
Your code only increases the length of duallistbox.
Try this:-
<lightning:dualListbox name="some name"
label= "Some field"
sourceLabel="Available"
selectedLabel="Chosen"
fieldLevelHelp="This is a dual listbox"
options="{!v.options}"
onchange="{! c.handleChange }"
min="{!v.min}"
max="{!v.max}"/>
Or you can try this:-
this code to the CSS Style in the Lightning Component:
.THIS .slds-dueling-list__column_responsive {
min-width: 45%;
}
.THIS .slds-dueling-list__column_responsive .slds-dueling-list__options {
min-width: 100%;
}
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
.THIS .slds-dueling-list__column_responsive {
flex: 0 1 var(--lwc-sizeSmall,15rem) !important;
min-width: 35rem;
}
If it is useful, Please mark as Best Answer