From a4629cfc8a991421d5d063f872b0b2fb8acb80b8 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sat, 25 Feb 2017 13:06:46 -0800 Subject: [PATCH] link resetter --- frontend/src/components/TopicCard/Attachments.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/TopicCard/Attachments.js b/frontend/src/components/TopicCard/Attachments.js index 0ba7234f..5769f420 100644 --- a/frontend/src/components/TopicCard/Attachments.js +++ b/frontend/src/components/TopicCard/Attachments.js @@ -17,6 +17,10 @@ class Attachments extends Component { $('.embedly-card').remove() } + resetLink = () => { + this.setState({ linkEdit: '' }) + } + onLinkChangeHandler = e => { this.setState({ linkEdit: e.target.value }) } @@ -55,7 +59,7 @@ class Attachments extends Component { value={linkEdit} onChange={this.onLinkChangeHandler} onKeyUp={this.onLinkKeyUpHandler}> - {linkEdit &&
} + {linkEdit &&
} {link && }