From a81c91b057b2cc5b1ff64f5d2ac8d96cb4b07572 Mon Sep 17 00:00:00 2001 From: MGJamJam Date: Thu, 9 May 2024 15:48:06 -0300 Subject: [PATCH] do not set value if value isEmpty for GroupBy and OrderBy Input --- .../src/components/FilterInput.tsx | 1 - .../src/components/GroupByInput.tsx | 8 +++++++- .../src/components/OrderByInput.tsx | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bitmovin-analytics-datasource/src/components/FilterInput.tsx b/bitmovin-analytics-datasource/src/components/FilterInput.tsx index a34a065..0ab3071 100644 --- a/bitmovin-analytics-datasource/src/components/FilterInput.tsx +++ b/bitmovin-analytics-datasource/src/components/FilterInput.tsx @@ -51,7 +51,6 @@ export function FilterInput(props: Props) { type="text" onChange={(value) => props.onValueChange(value.currentTarget.value)} width={30} - placeholder="Enter Filter value" /> - props.onReorderGroupBy(REORDER_DIRECTION.DOWN)} diff --git a/bitmovin-analytics-datasource/src/components/OrderByInput.tsx b/bitmovin-analytics-datasource/src/components/OrderByInput.tsx index ebbc281..ed6d816 100644 --- a/bitmovin-analytics-datasource/src/components/OrderByInput.tsx +++ b/bitmovin-analytics-datasource/src/components/OrderByInput.tsx @@ -6,6 +6,7 @@ import { QueryAttribute } from '../types/queryAttributes'; import { QueryAdAttribute } from '../types/queryAdAttributes'; import { QuerySortOrder } from '../types/queryOrderBy'; import { REORDER_DIRECTION } from './GroupByInput'; +import { isEmpty } from 'lodash'; type Props = { readonly isAdAnalytics: boolean; @@ -29,7 +30,7 @@ export function OrderByInput(props: Props) { return (