Skip to content

Conversation

@DiegoCardoso
Copy link
Contributor

Description

CP from #8303 to 23.7

Depends on #8326

* fix: make `Icon` work when used in `Action`

This change fixes the issue when adding an icon to an action in the
context menu in Spreadsheet. To make it work, the following
modifications were made:
- Add the `Icon` instance passed to the `Action(String, Icon)` as a
virtual child to `Spreadsheet`
- Passes the node id of the element to the client side to be fetched
- Modifies the `SpreadsheetAction` class to overwrite the `getHTML`
method in order to add a container for the icon, in case the action has
one
- Attaches the icon instance to the container
- Creates an event to be dispached when the context menu is closed
- Listens to the event to make sure that any `Icon` instance is safely
removed from the client to avoid memory leaks

Fixes #8288
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.

2 participants