Fixed issue #2279 - performance issue in bulk action selection in overview (fixes #2279)

This commit is contained in:
Billy Zhou 2018-10-17 10:19:19 +02:00
parent 5b38c9e546
commit fb24de11cc
2 changed files with 8 additions and 1 deletions

View file

@ -412,6 +412,12 @@ class App.ControllerTable extends App.Controller
return if !@bindCheckbox
return if !@bindCheckbox.events
return if _.isEmpty(clicks)
# If a select_all callback exists, then trigger it once insteading of triggering the callback once for each checkbox
if @bindCheckbox.select_all
@bindCheckbox.select_all(clicks[0]..., e)
return
for event, callback of @bindCheckbox.events
if event == 'click' || event == 'change'
for click in clicks
@ -1007,4 +1013,4 @@ class App.ControllerTable extends App.Controller
for position in [0..array1.length-1]
if array1[position] isnt array2[position]
return position
true
true

View file

@ -1175,6 +1175,7 @@ class Table extends App.Controller
bindCheckbox:
events:
'click': callbackCheckbox
select_all: callbackCheckbox
)
@renderPopovers()