From 231e620f9528748c720eeb3625b2e8cbde179c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Siatka?= Date: Tue, 15 Oct 2019 11:13:24 +0200 Subject: [PATCH] Explore: updates responsive button to forward ref --- public/app/features/explore/ResponsiveButton.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/app/features/explore/ResponsiveButton.tsx b/public/app/features/explore/ResponsiveButton.tsx index 553ee764577..97f763e57f1 100644 --- a/public/app/features/explore/ResponsiveButton.tsx +++ b/public/app/features/explore/ResponsiveButton.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { forwardRef } from 'react'; export enum IconSide { left = 'left', @@ -19,7 +19,7 @@ function formatBtnTitle(title: string, iconSide?: string): string { return iconSide === IconSide.left ? '\xA0' + title : iconSide === IconSide.right ? title + '\xA0' : title; } -export const ResponsiveButton = (props: Props) => { +export const ResponsiveButton = forwardRef((props, ref) => { const defaultProps = { iconSide: IconSide.left, }; @@ -37,4 +37,4 @@ export const ResponsiveButton = (props: Props) => { {iconClassName && iconSide === IconSide.right ? : null} ); -}; +});