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

Simplify menuitem command handling #1354

Closed
ribizli opened this issue Nov 18, 2016 · 0 comments
Closed

Simplify menuitem command handling #1354

ribizli opened this issue Nov 18, 2016 · 0 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@ribizli
Copy link

ribizli commented Nov 18, 2016

I'm quite sure this logic is unneeded complex:

            if(!item.eventEmitter) {
                item.eventEmitter = new EventEmitter();
                item.eventEmitter.subscribe(item.command);
            }
            item.eventEmitter.emit(event);

Couldn;t you simply do this:

  item.command(event);

Have I missed something, has your logic any purpose?

@cagataycivici cagataycivici self-assigned this Jun 17, 2017
@cagataycivici cagataycivici added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Jun 17, 2017
@cagataycivici cagataycivici added this to the 4.1.1 milestone Jun 17, 2017
@cagataycivici cagataycivici changed the title MenuItem command callback overengineered Simplify menuitem command handling Jun 28, 2017
@cagataycivici cagataycivici added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Jun 28, 2017
@cagataycivici cagataycivici modified the milestones: 4.1.0-RC3, 4.1.1 Jun 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants