Back to API overview

DROPDOWN Object

The dropdown object represents a list of entries. Each entry contains a text to display, what to set in the context, and whether it is highlighted. Each entry can also contain subentries.

The dropdown object is implicitly contained in a TAB entry of a TABLE

The dropdown object should be used to construct an e.g. select interface element.

Sample

  {
     "type" : "dropdown",
     "text" : "Team",
     "resource" : "/teams",
     "entries" : [
       {
         "text" : "Herren NLA Gruppe 1",
         "set_in_context" : {
           "team_id" : 429494
         },
         "entries" : [],
         "highlight" : true
       },
       {
         "text" : "Herren 3. Liga Gruppe 5",
         "set_in_context" : {
           "team_id" : 428293
         },
         "entries" : [],
         "highlight" : false
       }
     ],
     "levels" : ["Team"],
     "highlight" : false
  }

Usage

Use the entries to construct a dropdown (in HTML: select) interface element where the text data is used for the actual list and the set_in_context data to enact changes when an entry is selected.

The dropdown object does not come with a context of its own. But it contains set_in_context data that should be used to modify the current context, should an entry of the dropdown be selected.

For example, in a results search, there could be multiple dropdowns, season, club, and team. And each dropdown would set season, club_id, and team_id, respectively, in the context. The context can then be used to perform a results search.