From a74cb001b40387c00108de095e523183280b546a Mon Sep 17 00:00:00 2001 From: Jason Robinson Date: Thu, 28 Feb 2019 15:51:36 +0200 Subject: [PATCH] Remove unnecessary ref from Stickerpicker There is a ref=target in the call to render AccessibleButton for the hide stickers button. This ref is not present in the show case. When clicking the stickerpicker show button, React gives a warning: > Warning: Stateless function components cannot be given refs > (See ref "target" in AccessibleButton created by Stickerpicker). > Attempts to access this ref will fail. Removed the ref. Stickerpicker hide/show still works fine, no warning. Signed-off-by: Jason Robinson --- src/components/views/rooms/Stickerpicker.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/views/rooms/Stickerpicker.js b/src/components/views/rooms/Stickerpicker.js index c9f3195b08..0d7f808d23 100644 --- a/src/components/views/rooms/Stickerpicker.js +++ b/src/components/views/rooms/Stickerpicker.js @@ -349,7 +349,6 @@ export default class Stickerpicker extends React.Component { key="controls_hide_stickers" className="mx_MessageComposer_button mx_MessageComposer_stickers mx_Stickers_hideStickers" onClick={this._onHideStickersClick} - ref='target' title={_t("Hide Stickers")} > ;