Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to refresh cached content-action (visible/disabled properties) #7604

Open
romainbrochot opened this issue Apr 27, 2022 · 0 comments
Open

Comments

@romainbrochot
Copy link

romainbrochot commented Apr 27, 2022

Type of issue: (check with "[x]")

  • New feature request
  • [X ] Bug
  • Support request
  • Documentation

Current behaviour:
When content-actions are rendered in a document-list row for the first time, they are cached in the "rowMenuCache" class member of DocumentListComponent.

If we have, let's say 2 actions : lock / unlock a node.
We can hide or disable the actions given the metatadata of the node with [visible] or [disabled]. This is working for first rendering of the actions.

If I click the lock action, there is an ACS REST API call that updates metadata and, on success, refreshes the document-list with .reload().
There is no way to set visible or disabled after .reload() because the actions are cached.

In the end, we have one node that was not locked, then locked with the content-action, and we still have the lock action after reloading the document-list.

Expected behavior:
Give the possibility to refresh cached row actions or refresh the cache/flush the cache after .reload().

Steps to reproduce the issue:
See "Current behaviour". Implement 1 or multiple action(s) that interact with node metadata and .reload() on documentlist.
Trying to manually set "visible" or "disabled" on the "actions" class member (actions: ContentActionModel[]) is not working because the getNodeActions() method retrieves them from the cache.

Component name and version:
document-list.component.ts
all ADF versions

Browser and version:
all

Node version (for build issues):
node 14.16.0

New feature request:

nf807942 added a commit to nf807942/alfresco-ng2-components that referenced this issue Aug 8, 2022
DenysVuika pushed a commit to nf807942/alfresco-ng2-components that referenced this issue Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant