0
htmlテーブルに使用可能な列の数が設定されています。ユーザーが必要な列を除外すると、選択した列のみの表が表示されます。 ここでは、表示する列の順序を設定するオプションをユーザーに与えたいと思います。 選択リストの列を並べ替えるためのリストと機能があります。下記のスクリーンショットを確認してください。angularjsを使用したhtmlテーブルの列の並べ替え
実際にはテーブル内の列を同じ順序で並べ替えるにはどうすればいいですか右側のリストで設定します。
これは私がこれまでしているコードです:事前に
<table class="table table-hover" id="basicTable">
<thead>
<tr>
<th ng-show="ShowDescription">Description</th>
<th ng-show="ShowDeviceId">Device ID</th>
<th ng-show="ShowUpdateRequired">Update Required</th>
<th ng-show="ShowOpenTime">Open Time</th>
<th ng-show="ShowOpenTimeAda">Open Time Ada</th>
<th ng-show="ShowKeypadCode">Keypad Code</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(k, v) in assets | filter: appliedFilter">
<td class="v-align-middle" ng-show="ShowDescription">
<p>{{v.description}}</p>
</td>
<td class="v-align-middle" ng-show="ShowDeviceId">
<p>{{v.extdoorid}}</p>
</td>
<td class="v-align-middle" ng-show="ShowUpdateRequired">
<p><span ng-if="v.updaterequired == '1'">Yes</span><span ng-if="v.updaterequired == '0'">No</span></p>
</td>
<td class="v-align-middle" ng-show="ShowOpenTime">
<p>{{v.opentime}}</p>
</td>
<td class="v-align-middle" ng-show="ShowOpenTimeAda">
<p>{{v.opentimeada}}</p>
</td>
<td class="v-align-middle" ng-show="ShowKeypadCode">
<p>{{v.keypadcode}}</p>
</td>
</tr>
</tbody>
</table>
おかげで、Laziale
ニースとクリーン。 – Brian