Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

too many components for aura - strike_row, strike_dataGrid #66

Closed
siddharatha opened this issue Aug 14, 2017 · 4 comments
Closed

too many components for aura - strike_row, strike_dataGrid #66

siddharatha opened this issue Aug 14, 2017 · 4 comments

Comments

@siddharatha
Copy link

When am trying to display more than 1000 records in the strike_dataGrid it throws an exception when it displays huge volume of records.

The fix which worked is adding the below line on strike_dataGrid

<aura:dependeny resource="strike_row" />

@ejwill
Copy link

ejwill commented Aug 14, 2017

I think it would better to have Pagination on the data grid in this case but @siddharatha fix sounds like it should be added too

@rsoesemann
Copy link

Do you have something like infinitive scrolling on your roadmap?

@salesforcemagic
Copy link

Part of the problem is actually in the strike_row component. There are too many aura:if conditions are being evaluated unnecessarily. Also, if these are ordered by the most commonly encountered data types, you can significantly improve performance. Try replacing the TR block with the one below and let me know what improvements you see. Two other improvements that can be made are around javascript performance and the dependency reference already mentioned.

    <tr>
        <aura:iteration items="{!v.fields}" var="field" indexVar="index">
            <td data-label="{!field.label}">
                <div aura:id="value-output" class="{!if(field.dataType != 'COMPONENT', 'slds-truncate', '')}">
                    <aura:if isTrue="{!field.dataType == 'STRING'}">
                        {!field.value}
                        <aura:set attribute="else">
                            <aura:if isTrue="{!field.dataType == 'CURRENCY'}">
                                <ui:outputCurrency value="{!field.value}"/>
                                <aura:set attribute="else">
                                    <aura:if isTrue="{!field.dataType == 'NUMBER'}">
                                        <ui:outputNumber value="{!field.value}"/>
                                        <aura:set attribute="else">
                                            <aura:if isTrue="{!field.dataType == 'BOOLEAN'}">
                                                <ui:outputCheckbox value="{!field.value}"/>
                                                <aura:set attribute="else">
                                                    <aura:if isTrue="{!field.dataType == 'PERCENT'}">
                                                        <ui:outputNumber value="{!field.value}"/>%
                                                        <aura:set attribute="else">
                                                            <aura:if isTrue="{!field.dataType == 'DATE'}">
                                                                <ui:outputDate value="{!field.value}"/>
                                                                <aura:set attribute="else">
                                                                    <aura:if isTrue="{!field.dataType == 'DATETIME'}">
                                                                        <ui:outputDateTime format="M/dd/yyyy H:mm a" value="{!field.value}"/>
                                                                        <aura:set attribute="else">
                                                                            <aura:if isTrue="{!field.dataType == 'EMAIL'}">
                                                                                <ui:outputEmail value="{!field.value}"/>
                                                                                <aura:set attribute="else">
                                                                                    <aura:if isTrue="{!field.dataType == 'PHONE'}">
                                                                                        <ui:outputPhone value="{!field.value}"/>
                                                                                        <aura:set attribute="else">
                                                                                            <aura:if isTrue="{!field.dataType == 'URL'}">
                                                                                                <ui:outputURL value="{!field.value}" label="{!field.value}"/>
                                                                                                <aura:set attribute="else">
                                                                                                </aura:set>
                                                                                            </aura:if>
                                                                                        </aura:set>
                                                                                    </aura:if>
                                                                                </aura:set>
                                                                            </aura:if>
                                                                        </aura:set>
                                                                    </aura:if>
                                                                </aura:set>
                                                            </aura:if>                                                            
                                                        </aura:set>
                                                    </aura:if>
                                                </aura:set>
                                            </aura:if>                                            
                                        </aura:set>
                                    </aura:if>
                                </aura:set>
                            </aura:if>                            
                        </aura:set>
                    </aura:if>
                </div>
            </td>
        </aura:iteration>
    </tr>

@daneowens3
Copy link
Contributor

added @siddharatha suggestion and expect to see the change in our next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants