angular-ui/ui-grid

Pinning module is a digest cycle behind

Open

#5.243 aberto em 21 de mar. de 2016

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)JavaScript (2.496 forks)batch import
grid-pinninghelp wanted

Métricas do repositório

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

Description

http://plnkr.co/edit/uRUdFmj6DpD9liBwo3Cp?p=preview

Notice that when you have a pinned column and click the toggle filter button, the pinned column seems to be behind a digest cycle, showing the filtering going away/appearing as two separate components rather than one. This seems odd, especially since i'm using NotifyDataChange to tell the grid to respond to the change in the gridOptions.

You also cannot register the event handler for api.pinning.on.columnPinned unless you do it within a $timeout.

This also becomes a problem when using the restore function, it seems that for all of the modules the restore function will fire the event handlers synchronously (which is fine), except for the pinning module. See the plunker: http://plnkr.co/edit/MlEmGQJiOU9u5X81qYjS?p=preview. Notice that I am trying to not handle the columnPinned event if i am using the restore functionality, but even after the restore has already occurred, the event is being raised sometime between then and the next digest cycle. In this example, if you wrap isRestoring = false in a timeout, it will behave as expected

Guia do colaborador