ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

beforeSelectionChange - Called Twice upon 'Shift + click'

Open kevinsoltis41 opened this issue 11 years ago • 4 comments

From their docs "Note: when shift+ Selecting multiple items in the grid this will only get called once and the rowItem will be an array of items that are queued to be selected."

When I attempted to replicate the 'Shift + click' functionality; I get the function called once from the initial click, and then (2) once where rowItems is an array of selected items, and then once for the second click - rowItem is the item where I selected.

I've listed a plunker below where I attempt to show my question by counting number of times we enter the beforeSelectionChange function: Plunker

kevinsoltis41 avatar Dec 18 '14 14:12 kevinsoltis41

My apologies if this was already covered. I attempted to do some research to no avail. //I'm new to this

kevinsoltis41 avatar Dec 18 '14 14:12 kevinsoltis41

OK, so looks like you're on 2.x. Have you considered upgrading to 3.0? You may get better support, as it is more actively developed.

PaulL1 avatar Dec 19 '14 21:12 PaulL1

Paul, I do plan to eventually, however I'm working with Breeze and have a rather complex page in place that takes any User's data choice and builds the appropriate fields/columns/templates/selections/navigation/crud ability based on the metadata set up to already build the correct columnDef for 2.x.

Thank you for looking into my issue though, Kevin

kevinsoltis41 avatar Dec 21 '14 17:12 kevinsoltis41

Closing old 2.x issue as all current development is on 3x.

If someone really needs this fix for 2.x, my advice is to fork and fix it. Sorry, I know it's not ideal, but it is the best we can offer with limited resources.

swalters avatar Nov 06 '15 23:11 swalters