vendredi 1 juillet 2022

Ember-table shows index on the header

I am using ember-table but have a weird behavior. It automatically adds index next to my header title.

image

But after I click one of the header to sort the table, the index will disappear as I want. How do I get rid of the index in the first place. Plus, without the sorting function, the table was normal.

After I click anyone of the header to sort the column, the index will go away.

image

Here is my sort object

sorts = [
  { valuePath: 'username' },
  { valuePath: 'total_assignment_count' },
  { valuePath: 'accepted_assignment_count' },
  { valuePath: 'accepted_rate' },
  { valuePath: 'acl_name' },
  { valuePath: 'repo_name'}
];

template

<EmberTable as |t|>
  <t.head
    @columns=
    @sorts=
    @onUpdateSorts=
  />
  <t.body @rows= />
</EmberTable>




Aucun commentaire:

Enregistrer un commentaire