3

I have a Modern sharepoint online list with 2 views. Is it possible to create 2 button to change the view "on the fly"? either json or via ClientSideExtension.ListViewCommandSet.CommandBar or is there an other way. I know I can create to links but that would reload the page and is to slow.

Thanks Morten

Update: Thanks Denis now i know React debug :) It looks like the change view "button / menu" is a customizedcommandbarbutton see picture, but i cannot find what it does. Because it is rather easy to make command bar buttons. enter image description here

2 Answers 2

0

I am not an expert at SharePoint Framework, but I can guess that we can't create a menu custom action that somehow can change React's state from outside and cause the proper page re-render.

Theoretically, if it's somehow possible, maybe SPFx's ListView command Set could do it. But I still doubt it.

enter image description here

0

If you create a List View command set extension in SPFx and redirect the user to a different page when he clicks on the button, that should do a partial page reload by default, not a full page reload.

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.