EasyUI Forum

General Category => Bug Report => Topic started by: kriyazhao on January 24, 2017, 08:34:21 AM



Title: How to override shift select with custom behaviour
Post by: kriyazhao on January 24, 2017, 08:34:21 AM
We have a scenario to shift select large amount of files, since we've subscribed onSelect event, shift select will trigger the event thousands of times, which slows selection down dramatically... I wonder how to override the shift select source code with my customized behaviour?

For example, when I select 1000 files, I don't want to fire onSelect event for the first 999 files, and only fire one event for the final 1000th file, so that it speeds up the selection process.

Could you please provide a patch file to show the way to override shift-select? Thank you very much!


Title: Re: How to override shift select with custom behaviour
Post by: jarry on January 25, 2017, 01:10:38 AM
Please download the patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.5.1-patch.zip. And then set the 'scrollOnSelect' property to false.

Code:
$('#tg').datagrid({
  singleSelect: false,
  ctrlSelect: true,
  checkOnSelect: false,
  scrollOnSelect: false
});