angular-ui/ui-grid

Sorting on nested object does not seem to work.

Open

#4.293 aberto em 31 de ago. de 2015

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)JavaScript (2.496 forks)batch import
help wantedneeds: analysis

Métricas do repositório

Stars
 (5.395 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

I have some columns with nested objects.

    var columnDefs = [
            {
                type: String,
                field: 'agent.name',
                displayName: 'Set',
                filter: {
                    condition: uiGridConstants.filter.CONTAINS
                }
            },
            {
                type: String,
                field: 'colorprofileName',
                displayName: 'Color profile',
                filter: {
                    condition: uiGridConstants.filter.CONTAINS
                },
                cellTemplate: '<a href=" ' + CONFIG.api.url + '/color-profile/download/{{row.entity._id}}">{{row.entity.colorprofile.name}}</a>'
            }
}

When I try to sort it throws this error:

Error: No sorting function found for type:function String() {
    [native code]
}

Filtering does seem to work by default, is there a specific way nested objects need to be configured for sorting?

Guia do colaborador