From 1d9f1831baf6caa2ae65e20e4b39dc6f1e084f7d Mon Sep 17 00:00:00 2001 From: Vicky Bansal <67091118+vicky-primathon@users.noreply.github.com> Date: Mon, 11 Oct 2021 17:51:35 +0530 Subject: [PATCH] Reset table page on filters reset (#8257) Date column to not show invalid date when column value is empty --- app/client/src/widgets/TableWidget/widget/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/client/src/widgets/TableWidget/widget/index.tsx b/app/client/src/widgets/TableWidget/widget/index.tsx index a878415357..6ffdcb5f56 100644 --- a/app/client/src/widgets/TableWidget/widget/index.tsx +++ b/app/client/src/widgets/TableWidget/widget/index.tsx @@ -324,7 +324,7 @@ class TableWidget extends BaseWidget { } catch (e) { isValidDate = false; } - if (isValidDate) { + if (isValidDate && value) { try { if (outputFormat === "SAME_AS_INPUT") { outputFormat = inputFormat; @@ -684,6 +684,7 @@ class TableWidget extends BaseWidget { applyFilters = (filters: ReactTableFilter[]) => { this.resetSelectedRowIndex(); this.props.updateWidgetMetaProperty("filters", filters); + this.props.updateWidgetMetaProperty("pageNo", 1); }; toggleDrag = (disable: boolean) => {