mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4360] No growing cells for Datatable compoennt (#4561)
This commit is contained in:
committed by
Eugenio Romano
parent
506ca306da
commit
ec9d2785fa
@@ -601,6 +601,23 @@ widths according to your needs:
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
#### No-growing cells
|
||||||
|
|
||||||
|
As mentioned before, in the beginning, all cells have the same width. You can prevent cells from growing by using the `adf-no-grow-cell` class.
|
||||||
|
|
||||||
|
```js
|
||||||
|
{
|
||||||
|
type: 'date',
|
||||||
|
key: 'created',
|
||||||
|
title: 'Created On',
|
||||||
|
cssClass: 'adf-ellipsis-cell adf-no-grow-cell'
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Notice that this class is compatible with `adf-ellipsis-cell` and for that reason it has a `min-width` of `100px`. You can override this property in your custom class to better suit your needs.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
#### Combining classes
|
#### Combining classes
|
||||||
|
|
||||||
You can combine the CSS classes described above to customize the table as needed:
|
You can combine the CSS classes described above to customize the table as needed:
|
||||||
|
BIN
docs/docassets/images/datatable-no-grow-cell.png
Normal file
BIN
docs/docassets/images/datatable-no-grow-cell.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
@@ -313,6 +313,11 @@
|
|||||||
flex-grow: 5;
|
flex-grow: 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.adf-datatable-cell-header.adf-no-grow-cell, .adf-datatable-cell.adf-no-grow-cell {
|
||||||
|
flex-grow: 0;
|
||||||
|
min-width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
.adf-datatable-cell, .adf-datatable-cell-header {
|
.adf-datatable-cell, .adf-datatable-cell-header {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
Reference in New Issue
Block a user