From 42ea79529d45f566e6491d14cc5683684cbc023c Mon Sep 17 00:00:00 2001 From: Nick Bisby Date: Mon, 26 Oct 2020 13:27:53 -0500 Subject: [PATCH] Do both reloads in a single go --- components/ItemGrid2/ItemGrid2.brs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/components/ItemGrid2/ItemGrid2.brs b/components/ItemGrid2/ItemGrid2.brs index a30757f5..0a7e9442 100644 --- a/components/ItemGrid2/ItemGrid2.brs +++ b/components/ItemGrid2/ItemGrid2.brs @@ -244,16 +244,17 @@ end sub ' 'Check if options updated and any reloading required sub optionsClosed() + reload = false if m.options.sortField <> m.sortField or m.options.sortAscending <> m.sortAscending then m.sortField = m.options.sortField m.sortAscending = m.options.sortAscending - m.loadedRows = 0 - m.loadedItems = 0 - m.data = CreateObject("roSGNode", "ContentNode") - m.itemGrid.content = m.data - loadInitialItems() - else if m.options.filter <> m.filter then + reload = true + end if + if m.options.filter <> m.filter then m.filter = m.options.filter + reload = true + end if + if reload m.loadedRows = 0 m.loadedItems = 0 m.data = CreateObject("roSGNode", "ContentNode")