I'm a CSS newbie, so this might be a trivial question. Nonetheless I need help.
I have this Lightning component used as action on a button.
<aura:component controller="..." access="GLOBAL" implements="force:lightningQuickActionWithoutHeader,force:hasRecordId">
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<div class="slds-page-header" role="banner">
<p class="slds-text-heading--label">{!v.record.Name}</p>
<h1 class="slds-page-header__title slds-m-right--small slds-truncate slds-align-left">Add new year</h1>
</div>
<c:strike_select aura:id="options" value="{!v.selected}" placeholder="Select Template" onchange="{!c.doSelect}">
<aura:renderIf isTrue="{!v.showBlank}">
<c:strike_option value="" label="No Template (Create blank record)" />
</aura:renderIf>
<aura:iteration items="{!v.templates}" var="tmpl">
<c:strike_option value="{!tmpl.id}" label="{!tmpl.label}" />
</aura:iteration>
</c:strike_select>
<lightning:button label="Cancel" onclick="{!c.doCancel}" variant="neutral" />
<lightning:button label="Continue" onclick="{!c.doContinue}" variant="brand" />
</aura:component>
The initalization code that populates the options:
({
doInit : function(cmp, event, helper) {
var action = cmp.get("c.getOptions");
action.setCallback(this, function(response) {
cmp.set("v.templates", response.getReturnValue());
cmp.find("options").blur(); // fails!
});
$A.enqueueAction(action);
}
But as you see in the screenshots there are three display problems.
- The select options are auto-opened on page load
- The select options are hidden outside of the modal (showing 2 ugly scrollbars
- Insufficient spacing between header, select and buttons. How can I make it look like a real modal. I read everything about mimicing modals but I could make it work.
Note: I am using Strike Components here as making it work with pure Design System is not what I want and Base Components also don't style properly.