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

Commit

Permalink
Remove unnecessary ref from Stickerpicker
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jaywink committed Feb 28, 2019
1 parent 93043c8 commit a74cb00
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/components/views/rooms/Stickerpicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")}
>
</AccessibleButton>;
Expand Down

0 comments on commit a74cb00

Please sign in to comment.