Pnpjs: renderListDataAsStream not passing in URL parameters

Created on 19 Oct 2020  路  5Comments  路  Source: pnp/pnpjs

Category

  • [ ] Enhancement
  • [x] Bug
  • [ ] Question
  • [ ] Documentation gap/issue

Version

Please specify what version of the library you are using: 2.0.10

Please specify what version(s) of SharePoint you are targeting: SharePoint Online

Expected / Desired Behavior / Question

The queryParams argument in List.renderListDataAsStream doesn't appear to do anything. I'm passing in a properly created Map and none of the query parameters within the map are being applied.

Furthermore, looking at source code I can't actually see the argument being used anywhere. Apologies if I missed it.

Steps to Reproduce

Basic reproduction:

  getListData(): Promise<unknown> {
    const testParams = new Map<string, string>([["test", "PARAM-HERE"]]);

    return sp.web.lists
      .getByTitle("DailySurveyResponses")
      .renderListDataAsStream({}, null, testParams);
  }
  1. Run above code (with sp already setup through the SharePoint framework).
  2. Look at the network request in dev tools. See that there's no query parameters on the request.
code fixed bug

All 5 comments

Thanks, we'll have a look. Certainly appears to not be correct. Need to go back and look at the history and see if it was ever correct and got incorrectly updated - or we just never included those params.

Yep, looks like it was added and then at some point removed. We added it here.

This is fixed and will be in the next release. I don't have a good explanation for how the code was removed obviously a mistake. I also added a test that will catch this in the future and ensure the query params are applied.

Thanks for the quick turn around time!

We aim to please when we can :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

un-dres picture un-dres  路  3Comments

simkessy picture simkessy  路  3Comments

KieranDaviesV picture KieranDaviesV  路  3Comments

pavan2920 picture pavan2920  路  3Comments

AJIXuMuK picture AJIXuMuK  路  3Comments