Skip to content

Commit

Permalink
use fn partial application
Browse files Browse the repository at this point in the history
  • Loading branch information
lougreenwood committed Oct 22, 2019
1 parent 9235193 commit a5c6981
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions addon/templates/components/basic-dropdown-content.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
{{will-destroy this.teardown}}

{{!-- V1 compatibility - See #498 --}}
{{on "focusin" (or @onFocusIn this.noop)}}
{{on "focusout" (or @onFocusOut this.noop)}}
{{on "mouseenter" (or @onMouseEnter this.noop)}}
{{on "mouseleave" (or @onMouseLeave this.noop)}}
{{on "focusin" (fn (or @onFocusIn this.noop) @dropdown)}}
{{on "focusout" (fn (or @onFocusOut this.noop) @dropdown)}}
{{on "mouseenter" (fn (or @onMouseEnter this.noop) @dropdown)}}
{{on "mouseleave" (fn (or @onMouseLeave this.noop) @dropdown)}}
...attributes>
{{yield}}
</Element>
Expand Down
20 changes: 10 additions & 10 deletions addon/templates/components/basic-dropdown-trigger.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
{{on "touchend" this.handleTouchEnd}}

{{!-- V1 compatibility - See #498 --}}
{{on "keydown" (or @onKeyDown this.noop)}}
{{on "mousedown" (or @onMouseDown this.noop)}}
{{on "touchend" (or @onTouchEnd this.noop)}}
{{on "click" (or @onClick this.noop)}}
{{on "mouseenter" (or @onMouseEnter this.noop)}}
{{on "mouseleave" (or @onMouseLeave this.noop)}}
{{on "focus" (or @onFocus this.noop)}}
{{on "blur" (or @onBlur this.noop)}}
{{on "focusin" (or @onFocusIn this.noop)}}
{{on "focusout" (or @onFocusOut this.noop)}}
{{on "keydown" (fn (or @onKeyDown this.noop) @dropdown)}}
{{on "mousedown" (fn (or @onMouseDown this.noop) @dropdown)}}
{{on "touchend" (fn (or @onTouchEnd this.noop) @dropdown)}}
{{on "click" (fn (or @onClick this.noop) @dropdown)}}
{{on "mouseenter" (fn (or @onMouseEnter this.noop) @dropdown)}}
{{on "mouseleave" (fn (or @onMouseLeave this.noop) @dropdown)}}
{{on "focus" (fn (or @onFocus this.noop) @dropdown)}}
{{on "blur" (fn (or @onBlur this.noop) @dropdown)}}
{{on "focusin" (fn (or @onFocusIn this.noop) @dropdown)}}
{{on "focusout" (fn (or @onFocusOut this.noop) @dropdown)}}
>
{{yield}}
</Element>
Expand Down

0 comments on commit a5c6981

Please sign in to comment.