From 9e9f336cde6bb06a2ff25d7de762b763968684bc Mon Sep 17 00:00:00 2001 From: Ashik Meerankutty Date: Tue, 17 Mar 2020 21:47:56 +0530 Subject: [PATCH 1/4] fixed inherit commonly used data on relative tab --- .../date_picker/super_date_picker/relative_utils.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/date_picker/super_date_picker/relative_utils.js b/src/components/date_picker/super_date_picker/relative_utils.js index eede3f94f77..e51638cf291 100644 --- a/src/components/date_picker/super_date_picker/relative_utils.js +++ b/src/components/date_picker/super_date_picker/relative_utils.js @@ -12,16 +12,11 @@ export function parseRelativeParts(value) { isString(value) && value.match(/now(([\-\+])([0-9]+)([smhdwMy])(\/[smhdwMy])?)?/); - const isNow = matches && !matches[1]; const operator = matches && matches[2]; const count = matches && matches[3]; const unit = matches && matches[4]; const roundBy = matches && matches[5]; - if (isNow) { - return { count: 0, unit: 's', round: false }; - } - if (count && unit) { const isRounded = roundBy ? true : false; return { @@ -45,6 +40,7 @@ export function parseRelativeParts(value) { break; } } + console.log(results); return results; } From 7d22505130af34b47ae1ebf6d7fc365fa5299654 Mon Sep 17 00:00:00 2001 From: Ashik Meerankutty Date: Tue, 17 Mar 2020 21:57:13 +0530 Subject: [PATCH 2/4] removed console statement --- src/components/date_picker/super_date_picker/relative_utils.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/date_picker/super_date_picker/relative_utils.js b/src/components/date_picker/super_date_picker/relative_utils.js index e51638cf291..adbdb4e8b85 100644 --- a/src/components/date_picker/super_date_picker/relative_utils.js +++ b/src/components/date_picker/super_date_picker/relative_utils.js @@ -40,7 +40,6 @@ export function parseRelativeParts(value) { break; } } - console.log(results); return results; } From c3c2a305e4daef875cc0429a6f85b38c374f3796 Mon Sep 17 00:00:00 2001 From: Ashik Meerankutty Date: Tue, 17 Mar 2020 22:13:03 +0530 Subject: [PATCH 3/4] updated cl --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe5fd37ca4c..5a29f3cf71c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ **Bug Fixes** +- Fixed bug in `EuiSuperDatePicker` to show correct values of commonly used values in relative tab ([#3106](https://github.com/elastic/eui/pull/3106)) - Fixed `EuiFieldNumber` so values of type `number` are now allowed ([#3020](https://github.com/elastic/eui/pull/3020)) - Fixed SASS `contrastRatio()` function in dark mode by fixing the `pow()` math function ([#3013], (https://github.com/elastic/eui/pull/3013)) - Fixed bug preventing `EuiDataGrid` from re-evaluating the default column width on resize ([#2991](https://github.com/elastic/eui/pull/2991)) From 722ff244c302b369608d35c4436d682147cd92c8 Mon Sep 17 00:00:00 2001 From: Ashik Meerankutty Date: Thu, 19 Mar 2020 20:12:21 +0530 Subject: [PATCH 4/4] moved cl --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af6d14fe07b..a434e30f3cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ **Bug Fixes** +- Fixed bug in `EuiSuperDatePicker` to show correct values of commonly used values in relative tab ([#3106](https://github.com/elastic/eui/pull/3106)) - Fixed race condition in `EuiIcon` when switching from dynamically fetched components ([#3118](https://github.com/elastic/eui/pull/3118)) ## [`21.1.0`](https://github.com/elastic/eui/tree/v21.1.0) @@ -28,7 +29,6 @@ **Bug Fixes** -- Fixed bug in `EuiSuperDatePicker` to show correct values of commonly used values in relative tab ([#3106](https://github.com/elastic/eui/pull/3106)) - Fixed `EuiFieldNumber` so values of type `number` are now allowed ([#3020](https://github.com/elastic/eui/pull/3020)) - Fixed SASS `contrastRatio()` function in dark mode by fixing the `pow()` math function ([#3013], (https://github.com/elastic/eui/pull/3013)) - Fixed bug preventing `EuiDataGrid` from re-evaluating the default column width on resize ([#2991](https://github.com/elastic/eui/pull/2991))