Skip to content

Is it possible to group by array field? #6161

@nhvu1988

Description

@nhvu1988

In this fiddle https://jsfiddle.net/j3dnm6q7/, I have data as

[
    { "name": "object 1", "category": ["cate 1", "cate 2"] },
    { "name": "object 2", "category": ["cate 1"] },
    { "name": "object 3", "category": ["cate 2"] }
]

In the ui-grid, it's ok for showing as the array but I can't make it group by separated category. It means when I press button "Group by category", only "Cate 1" and "Cate 2" will show and following the logic

  • Cate 1: contains "object 1" and "object 2"
  • Cate 2: contains "object 1" and "object 3"

Could ui-grid do that? or do I need to customize something?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions