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

Ember modifier {{on click does not work #961

Open
villander opened this issue Aug 25, 2022 · 4 comments
Open

Ember modifier {{on click does not work #961

villander opened this issue Aug 25, 2022 · 4 comments

Comments

@villander
Copy link

villander commented Aug 25, 2022

I'm using ember modifier to attach on click action in each row, but it does not work

"ember-table": "^4.0.0",
"ember-source": "~3.28.0",
<b.row
        {{on "click" (fn this.transitionToShow b.rowValue.id)}}
        class="table__row flex more-tools-row justify-between relative z-0 cell-clip cursor-pointer" as |r|>
        <r.cell
          class="py-3 w-1/5"

          as |cell column|
        >
          {{#if (and cell (eq column.valuePath 'vacantOn'))}}
            {{moment-format cell "LL"}}
          {{else}}
            {{cell}}
          {{/if}}
        </r.cell>
      </b.row>

Also I tried @onClick={{fn this.transitionToShow b.rowValue.id}} but the error is the same =/

image

cc // @mixonic @faf0-addepar

@villander villander changed the title Ember modifier on click does not work Ember modifier {{on click does not work Aug 25, 2022
@DanMonroe
Copy link
Contributor

@villander Try setting onSelect for ember-tbody

@villander
Copy link
Author

villander commented Aug 25, 2022

@DanMonroe I did it and I have the same errors.

<t.body @onSelect={{fn this.transitionToShow b.rowValue.id}} @rows={{this.units}} as |b|>
  <b.row

    class="table__row flex more-tools-row justify-between relative z-0 cell-clip cursor-pointer" as |r|>
    <r.cell
      class="py-3 w-1/5"

      as |cell column|
    >
      {{#if (and cell (eq column.valuePath 'vacantOn'))}}
        {{moment-format cell "LL"}}
      {{else}}
        {{cell}}
      {{/if}}
    </r.cell>
  </b.row>
</t.body>

@villander
Copy link
Author

@twokul any idea here, how to get it working on?

@mixonic
Copy link
Member

mixonic commented Aug 30, 2022

@villander at a glance, the call stack seems to be looping on transitionToShow. Have you been able to reproduce the bad behaviors without using that action?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants