Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit a74cb00

Browse files
committed
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 <[email protected]>
1 parent 93043c8 commit a74cb00

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/components/views/rooms/Stickerpicker.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,6 @@ export default class Stickerpicker extends React.Component {
349349
key="controls_hide_stickers"
350350
className="mx_MessageComposer_button mx_MessageComposer_stickers mx_Stickers_hideStickers"
351351
onClick={this._onHideStickersClick}
352-
ref='target'
353352
title={_t("Hide Stickers")}
354353
>
355354
</AccessibleButton>;

0 commit comments

Comments
 (0)