SPFx Extension BaseListViewCommandSet - Unable to refresh page

%3CLINGO-SUB%20id%3D%22lingo-sub-1320690%22%20slang%3D%22fr-FR%22%3ESPFx%20Extension%20BaseListViewCommandSet%20-%20Unable%20to%20refresh%20page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1320690%22%20slang%3D%22fr-FR%22%3E%3CP%3EI%20created%20a%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3ESPFx%20BaseListViewCommandSet%20extension.%20My%20component%20puts%20the%20status%20of%20all%20selected%20rows.%20The%20update%20works%20well.%3C%2FP%3E%3CP%3EHowever%2C%20when%20I%20want%20to%20refresh%20the%20page%20(location.reload%20()%3B)%20at%20the%20end%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eof%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EOnExecute%20method%2C%20the%20page%20does%20not%20refresh.%3C%2FP%3E%3CP%3EIn%20debug%20mode%2C%20the%20page%20refreshes%2C%20in%20package%20deployed%20mode%2C%20the%20page%20does%20not%20refresh.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CSPAN%20class%3D%22lit%22%3E%40override%3C%2FSPAN%3E%0A%20%20%3CSPAN%20class%3D%22kwd%22%3Epublic%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20onExecute%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22kwd%22%3Eevent%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3EIListViewCommandSetExecuteEventParameters%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%3A(%3C%2Fimg%3E%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22kwd%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22pun%22%3E%7B%3C%2FSPAN%3E%0A%20%20%3CSPAN%20class%3D%22com%22%3E%2F%2Fcode%20...%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20%20location%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3Ereload%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E()%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22pun%22%3E%7D%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3EAny%20Idea%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOlivier%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

I created a SPFx BaseListViewCommandSet extension. My component puts the status of all selected rows. The update works well.

However, when I want to refresh the page (location.reload ();) at the end of the OnExecute method, the page does not refresh.

In debug mode, the page refreshes, in package deployed mode, the page does not refresh.

 

@override
  public onExecute(event: IListViewCommandSetExecuteEventParameters): void {
  //code ...  location.reload ();
}

Any Idea ?

 

Olivier,

0 Replies