Saulis / iron-data-table

iron-data-table is a Web Component for displaying data as a table or grid. Built on top of iron-list using Polymer.
Apache License 2.0
147 stars 66 forks source link

Different events for cell selection and checkbox selection #195

Open JayKakadiya opened 7 years ago

JayKakadiya commented 7 years ago

Can we have a different event name for grid cell selection and check box selection or original event passed while firing these events ?

Scenario is while this events are getting fired i want to know that this event is fired for cell selection or check box selection. Ideally each cell selection should have sent cell identification detail along with model in current implementation.

Saulis commented 7 years ago

Hi!

My recommendation would be to have a custom checkbox column which you can apply whatever listeners you want:

<data-table-column>
  <template>
    <paper-checkbox checked="{{selected}}" on-checked-changed="_doStuff"></paper-checkbox>
  </template>
</data-table-column>
star08006 commented 7 years ago

Hi, Saulis,

How can I set a 'selectAll' checkbox in the header if using a custom checkbox?