728x90
반응형
Syntax
column.adjust()
➡ 레이아웃의 너비를 다시 계산한다.
Example
$('a[data-toggle="tab"]').on('shown.bs.tab', function(e){
$($.fn.dataTable.tables(true)).DataTable()
.columns.adjust();
});
➡ 부트스트랩의 탭을 사용했을 때 다른 탭을 눌러서 다른 테이블이 다시 로딩될때 datatables의 table 너비를 다시 계산하라는 명령.
columns.adjust().draw()
➡ 너비를 다시 계산한 후 다시 그리라는 명령.
참조 https://datatables.net/reference/api/columns.adjust()
columns.adjust()
columns.adjust() Since: DataTables 1.10 Recalculate the column widths. Description Like HTML tables, DataTables attempts to layout tables in an optimal format based on the data in the cells. As the data changes, it can sometimes be useful to recalculate th
datatables.net
728x90
반응형
'Front > JS & jQuery' 카테고리의 다른 글
[jQuery][datatables] columnDefs . width (0) | 2022.06.05 |
---|---|
[jquery][datatables] 열너비조정 함수모음 (0) | 2022.06.04 |
[jQuery] .trigger('click') 과 .on('click') (0) | 2022.05.31 |
[jQuery] .attr() .prop() 차이 (0) | 2022.05.30 |
[JS] 여러개의 값 리턴하기 (0) | 2022.05.27 |