I have a remarks column in my data grid and its length may vary. I don't want to display the whole text directly in the grid and only want to display first 2/3 lines of the paragraph. I want the complete text to be displayed only on a hover or a click.
Currently I am using a vertically expandable text area that cannot be edited to display the remarks. It is not looking good on the web page and so I am looking for better options.
My HTML is:
<div class="widget-content" ng-controller="getReservationController">
<table ng-table="reservationsList" show-filter="true" class="table table-striped table-bordered" wt-responsive-table>
<tr ng-repeat="reservation in data" >
<td data-title="'#'">{{$index + 1}}</td>
<td data-title="'Remarks'">
<textarea disabled style="width:180px; resize:vertical">{{reservation.remark}}</textarea>
</td>
</tr>
</table>
</div>
Controller :
myApp.controller('getReservationController', ['$scope', 'reservationServices', 'dataTable', '$rootScope', '$location', '$filter', function ($scope, reservationServices, dataTable, $rootScope, $location, $filter) {
reservationServices.getReservations().then(function (result) {
$scope.data = result.data;
});
}]);
I am new to angular and don't have any clue to achieve this in a way it doesn't break the data grid.
Can anyone help me out by recommending a better option to display the 'Remarks' within the <td>
rather than displaying it using a disabled text area?
Please show examples with code rather than directions as I am in learning phase and examples are more useful.