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

ROU-4904: Fix ContextMenu to allow item changes when clicking on a column #419

Merged
merged 4 commits into from
Jun 19, 2024

Conversation

rugoncalves
Copy link
Contributor

This PR is for fixing the misbehavior of the ContextMenu, when options are added/removed/made disabled, on the on the event of the OnMenuToggle of the ContextMenu block.

What was happening

  • The changes made by the developer on a given column for the context menu:
    • Adding a new Item
    • Removing an item
    • Making an item enabled
    • Making an item disabled
  • Evidence of the problem:

What was done

  • Made the event onToggle synchronous when the menu is opening
    • This will allow the changes made by the developer on the callback to be reflected on the items
    • This will cause the ChangeParameters to run before the method _canRaiseClickEvent is invoked
  • Made sure that when a context menu is opening, and an item is added or removed, that the itemSource is refreshed;

Test Steps

  1. Open the test page
  2. Right click on the column:
Description Price Name
Menu options Copy Copy Copy
Copy with headers This is the Price column Copy with headers
(separator) Copy with headers (separator)
Export > (separator) Export > (disabled)
(separator) (separator) (separator)
Freeze column(s) Export > Freeze column(s)
Unfreeze column(s) (separator) Unfreeze column(s)
Freeze column(s)
Unfreeze column(s)

Screenshots

Before After
IssueContextMenuOnMenuToggle context-menu-toggle

Checklist

  • tested locally
  • documented the code
  • clean all warnings and errors of eslint
  • requires changes in OutSystems - description of the OnToggle event
  • requires new sample page in OutSystems (if so, provide a module with changes)

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@rugoncalves rugoncalves marked this pull request as ready for review June 17, 2024 08:38
@rugoncalves rugoncalves requested a review from a team as a code owner June 17, 2024 08:38
@rugoncalves rugoncalves merged commit aba3410 into dev Jun 19, 2024
9 of 13 checks passed
@rugoncalves rugoncalves deleted the ROU-4904 branch June 19, 2024 10:12
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

Successfully merging this pull request may close these issues.

3 participants