Skip to content

allow event handlers at class level #72

Closed

Description

@catmando

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

Activity

  1. added this to the alpha1.3 milestone on Dec 7, 2018
  2. catmando commented on Jan 15, 2019

    @catmando
    ContributorAuthor

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

  3. added
    ready-to-releaseInternal Use Only: Has been fixed, specs passing and pushed to edge branch
    on Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-to-releaseInternal Use Only: Has been fixed, specs passing and pushed to edge branch

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions