App Studio

Version 4.0
How To
Documentation
    Learn More

      search:sort

      Description

      The sort directive for selecting how the data on the page should be sorted. The sort tag should be wrapped in a Layout Controls Tag.

      Usage

      as element:
      <search:sort
             response="{string}"
             fields="{string}"
             [default-label="{string}"]
             [title="{string}"]
             [default-order="{string}"]
             [mode="{string}"]>
      </search:sort>

      Directive info

      • This directive creates new scope.

      Parameters

      ParamTypeDetails
      responsestring

      The name of the response

      fieldsstring

      Fields to provide sorting on (comma-separated).

      default-label
      (optional)
      string

      Label to display for the 'default' sort option when no specific sorts are applied. Usually implies sorting on score or relevance. Default: 'relevance'

      title
      (optional)
      string

      Add a title to display. Default: 'Sort by'

      default-order
      (optional)
      string

      Attribute to set the default sort order of Sort Fields (asc or desc). Default: 'asc'

      mode
      (optional)
      string

      The mode in which the sorting should work, be default click. click: Selecting a sort will sort in the default order, when clicking on a selected sort this sort will be removed, to change the order use the ascending and descending options at the bottom of the dropdown. toggle: Selecting a sort will sort in the default order, when clicking on the selected sort again it will reverse the order.

      Example

      Source

      
      
      
      
      
      

      Demo