Skip to content

Multiple requests made for expandable row template #4631

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ventralnet opened this issue Nov 3, 2015 · 1 comment
Open

Multiple requests made for expandable row template #4631

ventralnet opened this issue Nov 3, 2015 · 1 comment

Comments

@ventralnet
Copy link

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.

@swalters swalters self-assigned this Jan 29, 2016
@swalters swalters added this to the 3.1 milestone Jan 29, 2016
@jkjustjoshing
Copy link

I'm using a template for 2 different columns and it's being requested twice - using $templateRequest instead of just requesting the template via $http might solve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants