Closed usharanitalatala closed 6 years ago
A few things to note:
selectedItems
property to be notified of changes when items are added. See the Polymer docs*-changed
events. Those events don't bubble. You need to add event listeners directly to the px-data-grid node.Here's demo code showing how to listen to selectedItems changing: https://glitch.com/edit/#!/glimmer-eyeliner?path=public/src/data-grid-demo.html:59:76
Here's that code running, open your console and select a few items to see the console.log result: https://glimmer-eyeliner.glitch.me/
Thank you David but in our case selection mode is none so the above approach wont work. When I use vaadin grid active items it works as expected. Could you please suggest what is the best approach to handle row click event if the selection mode is none?
Reason why we are using selection mode is none is to match with wireframes.
Hey @davidrleonard we are running into this problem as well, we are trying to capture the last clicked item, but activeItem is always null, active-item-changed is never being fired.
It appears that vaadin-grid's activeItem functionality isn't working, since on selection-mode='none', clicking a row should still set it to active, but nothing of the sort is happening.
Hi,
"activeItem" will be set if a row is selected?
If yes, I am using below snippet but activeItem observer is not working. Could you please check?
`<px-data-grid selection-mode="single" active-item="{{activeItem}}"
table-data="{{repos}}" hide-action-menu = "true" columns='[[coloums]]'
properties: activeItem:{
observer: '_activeItemChanged' },
or window.addEventListener('selected-items-changed', (e) => this.handleKick(e)); window.addEventListener('active-item-changed', (e) => this.handleKick(e)); are also not working.