From fef3f3be0a411dc4b7ea57c11fefc64fad680a7d Mon Sep 17 00:00:00 2001 From: Sidney Alcantara Date: Thu, 1 Oct 2020 16:56:07 +1000 Subject: [PATCH] fix ImportWizard preventing filters or order being set --- www/src/components/Wizards/ImportWizard/index.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/www/src/components/Wizards/ImportWizard/index.tsx b/www/src/components/Wizards/ImportWizard/index.tsx index 218215ed..2d472e56 100644 --- a/www/src/components/Wizards/ImportWizard/index.tsx +++ b/www/src/components/Wizards/ImportWizard/index.tsx @@ -41,14 +41,15 @@ export default function ImportWizard() { !tableState.config.tableConfig.doc?.columns ) { setOpen(true); + + if (Array.isArray(tableState.filters) && tableState.filters?.length > 0) + tableActions!.table.filter([]); + + if (Array.isArray(tableState.orderBy) && tableState.orderBy?.length > 0) + tableActions!.table.orderBy([]); + return; } - - if (Array.isArray(tableState.filters) && tableState.filters?.length > 0) - tableActions!.table.filter([]); - - if (Array.isArray(tableState.orderBy) && tableState.orderBy?.length > 0) - tableActions!.table.orderBy([]); }, [tableState]); if (tableState?.rows.length === 0) return null;