0

When I set the visibility of the the custom button, It should be applicable at both places (ContextMenu + CommandBar). I am having 2 buttons (Add Fav + Remove Fav). Based on few conditions, i am setting them up as visible = true / false. So this visibility setting should be applied globally for both (ContextMenu + CommandBar) but shows otherwise behavior.

Steps to Reproduce Consecutive attempts to add and remove favorite button for an item leads to this button mismatch . This is my element.xml file structure::

 <CustomAction
        Title="FavouriteButton"
        RegistrationId="101"
        RegistrationType="List"
        Location="ClientSideExtension.ListViewCommandSet"
        ClientSideComponentId="guid">
    </CustomAction>

and commandsetManifest.json file

 "items": {
    "AddFavourite": {
      "title": { "default": "Add to Favourites" },
      "iconImageUrl": "/Fav.png",
      "type": "command"
    },
    "RemoveFavourite": {
      "title": { "default": "Remove from Favourites" },
      "iconImageUrl": "/RemoveFav.png",
      "type": "command"
    }
  }

SS: enter image description here

0

It seems to be a bug and SPFX community have accepted this and will fix this in future releases. Thank you team for the affirmative response.

Reference : #1459

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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