我在显示数据表上有问题。它像图中那样溢出。
我已经尝试了withOption('autoWidth', false)
,但仍未修复。
我的HTML
<form class="bv-form" name="datagridForm" ng-submit="gridSubmitHandler(datagridForm, $event)" novalidate="novalidate">
<table class="inner-dataTable table table-striped nowrap" cellspacing="0" width="100%" datatable="" dt-options="dtOptions"
dt-columns="dtColumns" dt-column-defs="dtColumnDefs" dt-instance="dtInstanceCallback" id="{{getTableDomId()}}">
</table>
js code
$scope.dtOptions = DTOptionsBuilder.fromFnPromise(function() {
var defer = $q.defer();
defer.resolve($scope.tableData);
return defer.promise;
})
.withPaginationType('full_numbers')
.withOption('oLanguage', {
oPaginate: {
sFirst: "<<",
sLast: ">>",
sNext: ">",
sPrevious: "<"
}
})
.withOption('responsive', {details: {
// TODO: add configuration in application.xml to determine columns which should stay visible, like Actions:
// https://datatables.net/extensions/responsive/classes
// Doing something like keeping Actions visible on the far right is not really supported yet, the configuration would need to be a bit complex.
// Some discussion here: https://datatables.net/forums/discussion/22700/responsive-shows-hidden-columns-again/p2
renderer: responsiveRendererFn
}}).withOption('autoWidth', false)
.withOption('createdRow', function(row, data, dataIndex) {
$(row).addClass("" + data.id);
CommonFactory.coloringRow(data.statusCode, null, row);
$compile(row)($scope);
})
.withOption('preDrawCallback', preDraw)
.withOption('deferRender', true)
由于