Skip to content

[ChipField] allow to customize label #3162

@cherniavskii

Description

@cherniavskii

Is your feature request related to a problem? Please describe.
It's hard to customize ChipField label, e.g. use firstName + lastName instead of single field value.
Currently, it's possible to create custom component using Chip from material-ui, style it (add margins, like ChipField does).
We can make it way easier 🚀

Describe the solution you'd like
Add formatLabel function prop. It will accept record as argument and return label.

<ChipField formatLabel={record => `${record.firstName} ${record.lastName}`} />

Describe alternatives you've considered
There's an alternative, described above, but it's an overkill for such basic use case.

Additional context
I'd like to hear from you guys what do you think about that.
And, of course, I can submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions