diff --git a/src/components/Dashboard/common/ObjectActions.jsx b/src/components/Dashboard/common/ObjectActions.jsx index 41db9ee..d5f7cc3 100644 --- a/src/components/Dashboard/common/ObjectActions.jsx +++ b/src/components/Dashboard/common/ObjectActions.jsx @@ -74,12 +74,12 @@ function isSameActionUrl(action, actionUrl, currentUrl, pathname, search) { if (action.type === 'modal') { return actionUrl === currentUrl } - return ( - stripPageActionParams( - actionUrl.split('?')[0], - actionUrl.includes('?') ? actionUrl.split('?')[1] : '' - ) === stripPageActionParams(pathname, search) - ) + // Compare the action URL to the current location with its action param + // stripped. Default page actions (e.g. Info) match and stay hidden when + // already on that page. Actions that set their own action param (edit, + // cancelEdit, finishEdit, etc.) do not match and remain available — + // visibility is controlled by action.visible (e.g. _isEditing). + return actionUrl === stripPageActionParams(pathname, search) } // Recursively map actions to AntD Dropdown items