angular-ui/ui-grid

suggestion: grouping: support automatic pinning

Open

#4123 aperta il 5 ago 2015

Vedi su GitHub
 (5 commenti) (0 reazioni) (0 assegnatari)JavaScript (2496 fork)batch import
good first issuetype: enhancementworkaround

Metriche repository

Star
 (5395 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

It would be great to automatically pin a column when grouping by the column.

I've tried to implement a workaround with the available gridApi, but I cannot find an easy way to see if the column is already pinned (for example, the existance of an isPinnedLeft attribute) or already grouped.

pseudo-code:

gridApi.grouping.on.groupingChanged(col){
    if(!col.isPinnedLeft){
        gridApi.pinning.pinColumn(col, uiGridPinningConstants.container.LEFT)
    }
...
}

Guida contributor