You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-20 16:22:28 +03:00
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 <jasonr@matrix.org>
This commit is contained in:
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user