У меня есть jh-таблица с рабочим заголовком, который сортирует по каждому полю, но я бы хотел, чтобы она сортировалась по определенному полю по умолчанию при загрузке страницы.
Я попытался установить orderBy в ng-repeat из tbody, но я думаю, что это вызывает конфликт с jh-sort, и кнопки сортировки перестают работать правильно.
Есть ли способопределить сортировку по умолчанию в thead?
Это моя thead:
<thead>
<tr jh-sort="vm.predicate" ascending="vm.reverse" callback="vm.transition()">
<th jh-sort-by="id"><span data-translate="global.field.id">ID</span> <span class="glyphicon glyphicon-sort"></span></th>
<th jh-sort-by="name"><span data-translate="global.field.name">Nome</span> <span class="glyphicon glyphicon-sort"></span></th>
<th jh-sort-by="date"><span data-translate="cccApp.certificateRequestBatch.creationDate">Data de cadastro</span> <span class="glyphicon glyphicon-sort"></span></th>
<th jh-sort-by="status"><span data-translate="global.field.status">Situo</span> <span class="glyphicon glyphicon-sort"></span></th>
<th></th>
</tr>
</thead>