angular-ui/ui-grid

Multiple requests made for expandable row template

Open

#4.631 aberto em 3 de nov. de 2015

Ver no GitHub
 (1 comment) (1 reaction) (1 assignee)JavaScript (2.496 forks)batch import
grid-expandablehelp wantedinvestigating

Métricas do repositório

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

Description

In the uiGridExpandableRow directive's precompile method there is a call to gridUtil.getTemplate. This method asynchronously grabs the expandable row template and can ultimately issue a http GET request to grab the template. Between the time it takes for the initial GET request to respond, many other GET requests could be initiated as the expandable row directives are being compiled before the initial request places the template in the template cache.

In our case, on a low latency network about 8 or 9 requests were issued before the template was added to the template cache.

A work around for us was to manually load the expandable row template ourselves at the start of directive definition that used the ui-grid using a $templateRequest call. Of course this still suffers from the same asynchronous issues but the timing seems to resolve the issue for us. I don't have any ideas at the moment for a permanent fix.

Guia do colaborador