title: Sorting a list by a referenced field react-admin
body: <p>I started using <code>react-admin</code> and is basically works fine. However I have some trouble using the <code>ReferenceField</code>.</p>
  
  <p>The REST API I'm calling returns e.g. the following JSON data:</p>
  
  <p><strong>/language</strong></p>
  
  <pre><code>{
    "language": [
      {
        "id": 0,
        "name": "Language #0"
      },
      {
        "id": 1,
        "name": "Language #1"
      },
      {
        "id": 2,
        "name": "Language #2"
      },
      {
        "id": 3,
        "name": "Language #3"
      }
    ]
  }
  </code></pre>
  
  <p><strong>/myreferences</strong></p>
  
  <pre><code>{
    "myreferences": [
      {
        "id": 0,
        "langauge": {
          "id": 0,
          "name": "Language #0"
        },
        "name": "My reference #0"
      },
      {
        "id": 1,
        "langauge": {
          "id": 1,
          "name": "Language #1"
        },
        "name": "My reference #1"
      },
      {
        "id": 2,
        "langauge": {
          "id": 2,
          "name": "Language #2"
        },
        "name": "My reference #2"
      }
    ]
  }
  </code></pre>
  
  <p>And that's how map this in react-admin.</p>
  
  <pre><code>export const LanguageList = props =&gt; (
    &lt;List
      title="Languages"
      sort={{ field: "name", order: "ASC" }}
      filters={&lt;LanguageFilter/&gt;}
      {...props}
    &gt;
      &lt;Datagrid&gt;
        &lt;NumberField source="id" label="ID" /&gt;
        &lt;TextField source="name" label="Name" /&gt;
        &lt;EditButton /&gt;
      &lt;/Datagrid&gt;
    &lt;/List&gt;
  ); 
  
  export const MyReferenceList = props =&gt; (
    &lt;List
      title="My References"
      sort={{ field: "name", order: "ASC" }}
      filters={&lt;MyReferenceFilter /&gt;}
      {...props}
    &gt;
      &lt;Datagrid&gt;
        &lt;NumberField source="id" label="ID" /&gt;
        &lt;TextField source="name" label="Name" /&gt;
        &lt;ReferenceField source="langauge.id" reference="language" label="Language"&gt;
          &lt;TextField source="name" /&gt;
        &lt;/ReferenceField&gt;
        &lt;EditButton /&gt;
      &lt;/Datagrid&gt;
    &lt;/List&gt;
  );
  </code></pre>
  
  <p>My problem is that the references are shown correctly but when I click on the column for the referenced language name react-admin sorts by the language's ID instead of its name.</p>
  
  <p>What do I need to adapt so that sorting by name is working?</p>