From db513b3fa26652fd2cf42d727604df3ed2ad6002 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Mon, 29 Jun 2020 15:26:50 -0700 Subject: [PATCH] Allow a user to un-select a star By doing the intuitive thing and clicking it again. --- empathy/empathy.jsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/empathy/empathy.jsx b/empathy/empathy.jsx index dc13edf..4ef6807 100644 --- a/empathy/empathy.jsx +++ b/empathy/empathy.jsx @@ -730,9 +730,15 @@ class Ambiguities extends React.PureComponent { } onClick={(event) => { event.stopPropagation(); - this.setState({ - starred: set - }); + if (this.state.starred === set) { + this.setState({ + starred: null + }); + } else { + this.setState({ + starred: set + }); + } }} > {this.state.starred === set ? -- 2.43.0