0

In this table sorting function is not working for mail room date,the icon is showing but its not functioning.

enter image description here

This is the code..

<th class="slds-is-sortable" scope="col">
                    <div class="slds-truncate">
                        Document Code
                        <button class="slds-button slds-button--icon-bare">
                            <svg aria-hidden="true"
                                class="slds-button__icon slds-button__icon--small"> <use
                                xlink:href="{!URLFOR($Resource.SLDS0102, 'assets/icons/utility-sprite/svg/symbols.svg#arrowdown')}"></use>
                            </svg>
                            <span class="slds-assistive-text">Sort</span>
                        </button>
                    </div></th>

1 Answer 1

4

SLDS only give you sort icon. They don't actually sort data for you. So you need to write your custom logic to sort the table.

You can use Order By clause of SOQL to sort the records.

5
  • how to achieve this,can u show me code snippet Commented Aug 9, 2017 at 7:41
  • @SalesforceCoimbatore are you in lightnin or in VF? Commented Aug 9, 2017 at 7:59
  • Ligtning @Tushar Commented Aug 9, 2017 at 8:09
  • IN Lightning @Tushar Commented Aug 9, 2017 at 10:08
  • @SalesforceCoimbatore might help you Client side sorting Commented Aug 9, 2017 at 10:19

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.