From: Carl Worth Date: Mon, 29 Jun 2020 22:26:50 +0000 (-0700) Subject: Allow a user to un-select a star X-Git-Url: https://git.cworth.org/git?p=lmno.games;a=commitdiff_plain;h=db513b3fa26652fd2cf42d727604df3ed2ad6002 Allow a user to un-select a star By doing the intuitive thing and clicking it again. --- 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 ?