This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

mesinrusak
mesinrusak

In document, we can set width on Column options for Backend List

width   sets the column width, can be specified in percents (10%) or pixels (50px). There could be a single column without width specified, it will be stretched to take the available space.

However, when i tried to put width in columns.yaml is nothing happens there. then i see in 'modules/backend/widgets/lists/partials/_list_body_row.htm'

<td data-title="<?= e(trans($column->label)) ?>" class="list-cell-index-<?= $index ?> list-cell-name-<?= $column->columnName ?> list-cell-type-<?= $column->type ?> <?= $column->cssClass ?>">

there is no $column->width. Can you fix it? Thank you

axomat
axomat

I have just tested this using

    email_type:
        label: Type
        searchable: true
        width: 10px

as an example and it worked fine. Perhaps you could post your yaml file.

mesinrusak
mesinrusak

apparently, I am using the old version (download on Jan 2015). There is an commits from daftspunk on Feb 21, 2015 in github.

https://github.com/octobercms/october/commit/6bf72386ee25257fc522cc8d8f73af39e8d33c3a

the changes in _list_head_row.htm as follows:

<?php if ($column->width): ?>style="width: <?= $column->width ?>"<?php endif ?>
class="<?= $this->sortColumn==$column->columnName?'sort-'.$this->sortDirection.' active':'sort-desc' ?> list-cell-name-<?= $column->columnName ?>"
>

The problem has been solved now :)

@axomat, for thanks for helping

borisproano28965
borisproano28965

Column width doesnt work here either, the config is broken it should use min-width

1-4 of 4

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.