Computer Science, asked by mehru99, 9 months ago


The order of an inserted function need not be maintained.

Answers

Answered by thriveda
0

Explanation:

Questions Jobs Tags Users Badges Ask

Up vote

1

Down vote

Maintain Insertion Order in a Sorted Table

javascript html angularjs angularjs-ng-repeat

I have a table that allow me to insert a new row above or below another row. The table can be sorted by column.

The problem is that new rows with empty fields that are added into my sorted table will always appear on the top of the table.

This is the HTML:

<table>

<th ng-repeat= "header in headers">

<a href="#" ng-click="orderByField='name'; reverseSort = !reverseSort"> Name </a>

</th>

<tr ng-repeat "result in results | orderBy:orderByField:reverseSort">

<td>

<span>{{result}}</span>

<md-icon ng-click="addRow(result, true)"></md-icon>

<md-icon ng-click="addRow(result, false)"></md-icon>

</td>

</tr>

</table>

please mark me branlist

Similar questions