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

double click on listview item #514

Closed
genericuser-me opened this issue Jun 8, 2016 · 5 comments
Closed

double click on listview item #514

genericuser-me opened this issue Jun 8, 2016 · 5 comments

Comments

@genericuser-me
Copy link

genericuser-me commented Jun 8, 2016

<template>
    <require from="./selection.css"></require>
    <ak-list-view k-data-source.bind="dataSource"
                 k-selectable="multiple"
                 k-widget.bind="listView"
                 k-on-data-bound.delegate="dataBound()"
                 k-on-change.delegate="change()">
      <ak-template>
        <div class="product" k-on-dblclick.delegate="onListviewItemDblClick()">
            <img src="${ProductID}.jpg" alt="${ProductName} image" />
            <h3>${ProductName}</h3>
            <p>${UnitPrice}</p>
        </div>
      </ak-template>
    </ak-list-view>

    <div ref="pager" class="k-pager-wrap"></div>
</template>

Is is possible something like this: k-on-dblclick.delegate="onListviewItemDblClick()"

to have double click here for each item of the listview?

Thanks!

@JeroenVinke
Copy link
Member

I looked at the API and there doesn't appear to be a dbl click event. Try the DOM event dblclick though:

dblclick.delegate="onListviewItemDblClick()"

@genericuser-me
Copy link
Author

dblclick is not triggered as it goes for onchange event.

@JeroenVinke
Copy link
Member

https://gist.run/?id=ea101b1acd0e9a1c64cd82efab47b0f6 demonstrates this issue. I think that this is related to aurelia/templating#318

@JeroenVinke
Copy link
Member

OK, if you put a div around the template it works:

https://gist.run/?id=487e703dbd235480ea1da5ae5dae727c

        <div>
          <div class="product" dblclick.delegate="dblClicked($event)">
              <img src="http://demos.telerik.com/kendo-ui/content/web/foods/${ProductID}.jpg" alt="${ProductName} image" />
              <h3>${ProductName}</h3>
              <p>${UnitPrice}</p>
          </div>
        </div>

@genericuser-me
Copy link
Author

Works! Thanks a lot!

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

No branches or pull requests

2 participants