Skip to content

Commit 41f1422

Browse files
authored
Version 1.4.2 (#146)
* Update the documentation on column widths * Version 1.4.2
1 parent 452b1b1 commit 41f1422

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

docs/advanced_parameters.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,21 @@ function (td, cellData, rowData, row, col) {
301301

302302
The [`columnDefs.width`](https://datatables.net/reference/option/columns.width) argument let you adjust the column widths.
303303

304+
Note that the default value of `style`, or of `autoWidth` (defaults to `True`), might override custom column widths,
305+
so you might have to change their values as in the examples below.
306+
304307
You can set a fixed width for all the columns with `"targets": "_all"`:
305308

306309
```{code-cell}
307310
:tags: [full-width]
308311
309-
show(df, columnDefs=[{"width": "120px", "targets": "_all"}], scrollX=True)
312+
show(
313+
df,
314+
columnDefs=[{"width": "120px", "targets": "_all"}],
315+
scrollX=True,
316+
style="width:1200px",
317+
autoWidth=False,
318+
)
310319
```
311320

312321
You can also adjust the width of selected columns only:
@@ -317,6 +326,7 @@ You can also adjust the width of selected columns only:
317326
show(
318327
df,
319328
columnDefs=[{"width": "30%", "targets": [2, 3]}],
329+
style="width:100%;margin:auto",
320330
)
321331
```
322332

docs/changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
ITables ChangeLog
22
=================
33

4-
1.4.2-dev (2022-12-??)
4+
1.4.2 (2022-12-23)
55
------------------
66

77
**Fixed**
88
- We make sure that the table content has the same number of columns as the header ([#141](https://github.com/mwouts/itables/issues/141))
9+
- We have updated the documentation on column widths ([#145](https://github.com/mwouts/itables/issues/145))
910

1011

1112
1.4.1 (2022-12-04)

itables/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""ITables' version number"""
22

3-
__version__ = "1.4.2-dev"
3+
__version__ = "1.4.2"

0 commit comments

Comments
 (0)