miguelcobain / ember-paper

The Ember approach to Material Design.
http://miguelcobain.github.io/ember-paper
MIT License
889 stars 331 forks source link

paper-menu.item.shouldRenderButton doesn't handle the case when click handler is installed differently #1172

Closed 0x0badc0de closed 3 years ago

0x0badc0de commented 3 years ago

Template Linter is not happy with <content.menu-item @onClick={{action this.someAction}}> so I changed it to <content.menu-item {{on "click" this.someAction}}> as a result menu item is rendered without button wrapper. As a workaround I can set shouldRenderButton explicitly but wonder if there is a better solution or menu-item can catch the case with 'on click'?

miguelcobain commented 3 years ago

Why isn't the linter happy with <content.menu-item @onClick={{action this.someAction}}>? Could it be because of the action helper? <content.menu-item @onClick={{this.someAction}}> should work as well.

0x0badc0de commented 3 years ago

Oh, you are right, that's the way. Sorry for bothering. Thanks!