fix ImportWizard preventing filters or order being set

This commit is contained in:
Sidney Alcantara
2020-10-01 16:56:07 +10:00
parent e84e9f36b5
commit fef3f3be0a

View File

@@ -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;