1

I'm using the Pnp framework to provision a modern site with some web parts on it.

After adding Quick Links web part and open the page I see the text "We didn't find anything to show here." in that web part. If I click edit and then save the Quick Links appears.

Any suggestions how to make this work without have to click edit and save?

1
  • did you get the solution for this issue? Jul 8, 2021 at 13:15

1 Answer 1

0

PnPjs offers an option to modify the control proerties on a modern page programmatically:

const page = await sp.web.loadClientsidePage("/sites/s01/SitePages/test.aspx");

  const control = page.findControlById('81b84607-7f7a-49d8-b504-957a986d6e07') as ClientsideWebpart;

  let p = control.getProperties();
  control.setProperties(
    {
      //selectedListId: "83c5528a-ea95-46ad-82d0-61004b0cb839",
      ....
    }
  );

  page.save();

For more details, please refer to:

BR

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.