From 1dcf9e412b20c586c08e4895339e1808073f41e7 Mon Sep 17 00:00:00 2001 From: Dario Gieselaar Date: Sat, 21 Mar 2020 12:58:06 +0100 Subject: [PATCH] =?UTF-8?q?[7.x]=20Use=20static=20initializer=20in=20Valid?= =?UTF-8?q?atedDualRange=20for=20storybo=E2=80=A6=20(#60683)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #60356. --- .../public/validated_range/validated_dual_range.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/plugins/kibana_react/public/validated_range/validated_dual_range.tsx b/src/plugins/kibana_react/public/validated_range/validated_dual_range.tsx index e7392eeba3830..ce583236e7c81 100644 --- a/src/plugins/kibana_react/public/validated_range/validated_dual_range.tsx +++ b/src/plugins/kibana_react/public/validated_range/validated_dual_range.tsx @@ -47,7 +47,11 @@ interface State { } export class ValidatedDualRange extends Component { - static defaultProps: { fullWidth: boolean; allowEmptyRange: boolean; compressed: boolean }; + static defaultProps: { fullWidth: boolean; allowEmptyRange: boolean; compressed: boolean } = { + allowEmptyRange: true, + fullWidth: false, + compressed: false, + }; static getDerivedStateFromProps(nextProps: Props, prevState: State) { if (nextProps.value !== prevState.prevValue) { @@ -125,9 +129,3 @@ export class ValidatedDualRange extends Component { ); } } - -ValidatedDualRange.defaultProps = { - allowEmptyRange: true, - fullWidth: false, - compressed: false, -};