bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
53 stars 6 forks source link

Support text overflow of narrow grid cells to use ellipsis #2982

Open jsakalos opened 3 years ago

jsakalos commented 3 years ago

It can be easily seen on https://bryntum.com/examples/grid/basic/ by narrowing the first column.

Screen Shot 2021-06-04 at 11 41 14

The reason for this behavior is that we have text directly in the cell and the anonymous cell node cannot be addressed by CSS. However, it behaves as a flex item, therefore the text is vertically centered.

The problem can be solved at the cost of adding one wrapping <span> around the text:

    columns : [
        {
            text       : 'Name',
            htmlEncode : false,
            renderer({ value }) {
                return `<span class="b-cell-content">${value}</span>`;
            }

and css:

        .b-cell-content {
            text-overflow: ellipsis;
            overflow: hidden;
        }

TreeColumn (also in Gantt) and frameworks' renderers should be resolved too

isglass commented 3 years ago

Needs to be opt in to add that element, if it is not solvable without

matsbryntse commented 8 months ago

https://forum.bryntum.com/viewtopic.php?f=51&t=26756&p=133479#p133479

ghulamghousdev commented 1 month ago

+1 here https://forum.bryntum.com/viewtopic.php?p=148160#p148160