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

allow event handlers at class level #72

Closed
catmando opened this issue Dec 5, 2018 · 1 comment
Closed

allow event handlers at class level #72

catmando opened this issue Dec 5, 2018 · 1 comment
Labels
enhancement New feature or request ready-to-release Internal Use Only: Has been fixed, specs passing and pushed to edge branch
Milestone

Comments

@catmando
Copy link
Contributor

catmando commented Dec 5, 2018

for example:

class EditItem < HyperComponent
...
  render      { INPUT(etc, placeholder: PLACE_HOLDER, defaultValue: todo.title) }

  on(:enter)  { |evt| todo.update(title: evt.target.value) && save! }
  on(:blur)   { cancel! }
...
end
@catmando catmando added the enhancement New feature or request label Dec 7, 2018
@catmando catmando added this to the alpha1.3 milestone Dec 7, 2018
@catmando
Copy link
Contributor Author

closed. for example see hyper-component/spec/client_features/element_spec.rb it 'will subscribe at the class level'

@catmando catmando added the ready-to-release Internal Use Only: Has been fixed, specs passing and pushed to edge branch label Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready-to-release Internal Use Only: Has been fixed, specs passing and pushed to edge branch
Projects
None yet
Development

No branches or pull requests

1 participant