无法使用Lightening组件Salesforce在Strike MultiSelect元素上滚动

时间:2018-01-04 08:31:53

标签: javascript html css salesforce-lightning

当尝试滚动多选元素的选项列表时,整个选项列表会消失,因此我无法滚动选项列表。

<c:strike_multiSelectPicklist label="Responsible for" value="{!v.contact.Process_Responsibility__c}" class="responsibleFor">
    <aura:iteration items="{!v.processResponsibilityOptions}" var="option">
        <c:strike_option label="{!option}" value="{!option}" />
    </aura:iteration>
</c:strike_multiSelectPicklist>

这就是我正在使用的Strike Multiselect实现:https://gist.github.com/JitendraZaa/6b82ee00c45a4b1b66093966c5e6583b

1 个答案:

答案 0 :(得分:0)

似乎我以某种方式修复了它至少是为了我的需要:不得不改变这个:

 handleOnblur: function(component, event, helper) {
        var isMobile = component.get('v.isMobile');
        var eventSourceId = event.target;
        var mobileInputId = 'strike-multi-select-' + component.get('v.idNumber') + '--mobile';
        var shouldCloseMenu = ((isMobile && eventSourceId == mobileInputId) || !isMobile);

        if (shouldCloseMenu) {
            helper.closeMenu(component);
        }
    },

     handleOnblur: function(component, event, helper) {
        var isMobile = component.get('v.isMobile');
        var eventSourceId = event.target;
        var mobileInputId = 'strike-multi-select-' + component.get('v.idNumber') + '--mobile';
        var shouldCloseMenu = ((isMobile && eventSourceId == mobileInputId) || !isMobile);

        if (false) {
            helper.closeMenu(component);
        }
    },