Skip to content

Columns width, minWidth and maxWidth could be set to 'fitContent' #4915

Description

@landre3567

We mainly use the fitColumns layout but non growing colmns must have a 'width' set in pixels.

We don't want to hardcode the 'with' and we would like to set the non growing column width to fits its data (like in fitData layout).

We propose to not limit the 'width' parameter to pixels values.
'width' could be set with the magic value 'fitContent' so the width could be calcuated dynamicaly

Instead of

{
layout: "fitColumns",
columns : [
{
field: "id",
title: "Id",
width: 90,
},
{
field: "name",
title: "Name",
widthGrow: 100,
}
]
}

We could use

{
layout: "fitColumns",
columns : [
{
field: "id",
title: "Id",
width: 'fitContent',
},
{
field: "name",
title: "Name",
widthGrow: 100,
}
]
}

'fitContent' could be also applied to minWidth ans maxWidth

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Suggested FeatureA suggested feature that is waiting review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions