From 8d57629af33948532169bdef6d2adec2d7c3c535 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Wed, 19 Feb 2020 07:56:46 +1100 Subject: [PATCH] Fix scene selection not working (#373) --- ui/v2/src/hooks/ListHook.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/v2/src/hooks/ListHook.tsx b/ui/v2/src/hooks/ListHook.tsx index 28c550827..695ecae3a 100644 --- a/ui/v2/src/hooks/ListHook.tsx +++ b/ui/v2/src/hooks/ListHook.tsx @@ -321,12 +321,12 @@ export class ListHook { let thisIndex = -1; if (!!lastClickedId) { - startIndex = filterListImpl.getItems(result).findIndex((item) => { + startIndex = filterListImpl.getItems(result.data).findIndex((item) => { return item.id === lastClickedId; }); } - thisIndex = filterListImpl.getItems(result).findIndex((item) => { + thisIndex = filterListImpl.getItems(result.data).findIndex((item) => { return item.id === id; }); @@ -340,7 +340,7 @@ export class ListHook { endIndex = tmp; } - const subset = filterListImpl.getItems(result).slice(startIndex, endIndex + 1); + const subset = filterListImpl.getItems(result.data).slice(startIndex, endIndex + 1); const newSelectedIds : Set = new Set(); subset.forEach((item) => { @@ -352,7 +352,7 @@ export class ListHook { function onSelectAll() { const newSelectedIds : Set = new Set(); - filterListImpl.getItems(result).forEach((item) => { + filterListImpl.getItems(result.data).forEach((item) => { newSelectedIds.add(item.id); });