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

[ModalManager] uses instance (arrow) functions which makes hard to extend #10527

Closed
ianschmitz opened this issue Mar 4, 2018 · 2 comments
Closed
Labels
component: modal This is the name of the generic UI component, not the React module! new feature New feature or request

Comments

@ianschmitz
Copy link
Contributor

I was trying to extend the ModalManager class to add some additional functionality when add/remove are called. This was a little difficult since the functions inside of ModalManager use instance (arrow) functions. Ideally I would love to do something like:

class CustomModalManager extends ModalManager {
  add() {
    super.add();
    // some additional stuff
  }
  ...
}

But ended up having to do some monkey patching to get it to play nicely. Would you accept a PR to change to normal prototype methods instead of instance methods?

@oliviertassinari
Copy link
Member

oliviertassinari commented Mar 4, 2018

@ianschmitz Do you want to remove the arrow functions?

@oliviertassinari oliviertassinari added new feature New feature or request component: modal This is the name of the generic UI component, not the React module! labels Mar 4, 2018
@ianschmitz
Copy link
Contributor Author

I'm on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: modal This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants